- Notifications
You must be signed in to change notification settings - Fork2
A control and integration to display OpenMapSamples vector data in MapLibre-based maps.
License
adamfranco/OpenMapSamples-MapLibre
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
OpenMapSamples is a library to generate and providesample data for testing vector-based map renderings. Sample data is returned as GeoJSON and can berendered by mapping systems and styles to validate their coverage of combinations of data at differentzooms without hand-mapping all possible combinations.
TheOpenMapSamples-MapLibre package provides aMapLibre controlthat allows OpenMapSamples to be swapped for real data in MapLibre-based maps.
You can view a demonstration of this control athttps://adamfranco.github.io/OpenMapSamples-examples/.Look for the control in the bottom left of the map and choose a sample to replace the normal map datawith sample data and jump to the sample-data locations.
The SampleControl for MapLibre provides a button and dialog that temporarily replaces the source data in the map's style with sample data.
import SampleControl from 'openmapsamples-maplibre/OpenMapSamplesControl';import { default as OpenMapTilesSamples } from "openmapsamples/samples/OpenMapTiles";// Add our sample data.let sampleControl = new SampleControl({'permalinks': true});OpenMapTilesSamples.forEach((sample, i) => { sampleControl.addSample(sample);});// Map is a previously configure maplibre-gl map.map.addControl(sampleControl, 'bottom-left');
About
A control and integration to display OpenMapSamples vector data in MapLibre-based maps.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.