Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [layer-control]

use this tag when asking questions pertaining to the control that allows your users to control which layers they see on your map when using leaflet

0
votes
1answer
77 views

L.control.layers: Uncaught TypeError: Cannot read property 'minZoom' of undefined

I am trying to add my geojson urls which I loaded from my gist as L.LayerGroup for L.control.layers but I have encountered error "Uncaught TypeError: Cannot read property 'minZoom' of undefined" on L....
1
vote
1answer
1k views

Icon to layer control (leaflet.js)

Problem with adding icon to layer control. CSS: .fa-b:before { font-family: Courier; font-weight: bold; content: 'B'; } JS: var geojsonLayer = new L.GeoJSON.AJAX("...
0
votes
0answers
369 views

Folium marker clusters not working as expected

I have a problem. I can't use the MarkerCluster and LayerControl together. I need to add the MarkerCluster to the following code but unfortunately something still does not work. Can anyone tell me how ...
0
votes
1answer
93 views

Add hyperlinks in Leaflet layercontrol

Id like to add hyperlinks to the layers in my layer control. Leaflet site So when you open the layer control. Id like to be able to add a hyperlink to Basin, shoreline etc. This is my coded. //...
2
votes
0answers
295 views

Need to Add/Remove .png Legend with Leaflet Layers Control?

Supporting Links Website Location: http://bit.ly/2fXCiTH .JS File Location: http://bit.ly/2g56W0U Trying to accomplish I would like to have a specific .png legend associated to each individual ...
4
votes
1answer
824 views

Split Leaflet layer control into multiple tabs panel

I have a Leaflet map with several layers (21) grouped into 7 categories. Because of the large number of layers, I would like to give up on the standard L.control.layers look and turn it into a ...
1
vote
2answers
625 views

Leaflet dynamic legend for active layer controls?

I´m trying to achieve a map legend that shows the names of the active Layers and also adds new names to the list every time a new layer is checked. Also it should only appear when at least one layer ...
1
vote
1answer
545 views

How to get l.control layers or copyright into panel / div

I am tring to get l.controls like layers, copyright or draw into panel/div like: <div class="panel"> <div id="layers">...HERE LAYERS...</div> <div id="copyright">...HERE ...
5
votes
1answer
623 views

How to change the description (text) of a layer in the Leaflet Layer Control?

In the Layer Groups and Layers Control tutorial, you first create the "cities" object, and add it to the overlayMaps group control with the "Cities" label name. var baseMaps = { "Grayscale": ...