KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
mapboxgl-legend
★ 9
Open GitHub ↗
Mapbox GL layers control
Download README (.md)
Explore Similar Repositories
hncheck
:
A very simple app that checks to see if something under one of your domains has been submitted to HN, and emails you if it has.
webpack2-starter-kit
:
Webpack 2 starter kit
TerrainSynthesis
:
This Repository contains some R&D work for Procedural Terrain Synthesis
cordova-plugin-xfyun
:
cordova科大讯飞语音识别插件
PrivateBlog
:
Private blog agregator for emercoin blockchain
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
mapboxgl-legend
?
Download (.md)
# mapboxgl-legend Mapbox GL layers control **Example setup** ```js const map = new mapboxgl.Map({ container: 'map', style: 'https://openmaptiles.github.io/osm-bright-gl-style/style-cdn.json', center: [16.913988783638445, 52.357498181163635], zoom: 8 }) map.on('load', () => { map.addSource('layer_source', { type: 'geojson', data: { type: 'Feature', properties: { 'type': 'Point' }, geometry: { type: 'Point', coordinates: [16.895824670791626,52.39501823939772] } } }) let overlays = { 'Point Layer': { 'id': 'layer_id', 'source': 'layer_source', 'type': 'circle', 'paint': { 'circle-radius': 10, 'circle-color': '#007cbf' } } } let basemaps = { 'OSM Bright': 'https://openmaptiles.github.io/osm-bright-gl-style/style-cdn.json' } map.addLayer(overlays['Point Layer']) const legend = new MapboxLegend(overlays, basemaps) map.addControl(legend) }) ```