Questions tagged [layer-switcher]
The layer-switcher tag has no usage guidance.
18
questions
0
votes
1
answer
47
views
How to eliminate blank spaces in qgis2web layer-switcher
I am creating a web map using the qgis2web plug in (version 3.24) exporting the map in openlayers. I’ve added a title to the legend but I get blank spaces between the groups. I am not sure if I have ...
3
votes
1
answer
234
views
Adding zoom to extent button to layers displayed in ol-ext LayerSwitcher in OpenLayers?
I need a LayerSwitcher with the possibility of including a "zoom to extent" button for each layer. So, searching I found the example:
https://viglino.github.io/ol-ext/examples/control/map....
1
vote
1
answer
277
views
Adding button in LayerSwitcher (Openlayers)?
Got a layerswitcher in OpenLayers (ol-layerswitcher), added to a sidebar.
https://raw.githack.com/walkermatt/ol-layerswitcher/master/examples/sidebar.html
I would like to add buttons, for example, to &...
1
vote
1
answer
219
views
Toggle Leaflet JS KML layers individually
I'm creating a map with multiple KML layers, and have been able to get the KMLs to appear, however, implementing a simple checkbox to turn each layer on and off is proving to be a problem. I've tried ...
0
votes
0
answers
296
views
Layer switcher control and WMS layer control: How to set in which control you want to show the WMS layers in OpenLayers
I'm using the example http://viglino.github.io/ol-ext/examples/layer/map.wmscapabilities.html?lon=2.349572&lat=48.853266&z=16&url=http%3A%2F%2Fgeoservices.brgm.fr%2Fgeologie%3Flanguage%...
1
vote
2
answers
493
views
Showing legend/classified features in OpenLayers from qgis2web?
How can I show legend / classified features in my layer switcher legend in OpenLayers from qgis2web similar to how the Leaflet option exports it?
Openlayers shows legend items fine as a single style ...
1
vote
1
answer
1k
views
Clustering markers from GeoJSON after adding data to layer in Leaflet
I am trying to add clusters in my leaflet map. I use overlayMaps which helps to choose one of the active layers, and in that case I want my marker to be a cluster. But it is not clustering. Again ...
1
vote
1
answer
355
views
How I can update getfeautreinfourl query based on checked layers on ol-layerswitcher(ol-ext)?
I'm using ol-layerswitcher from ol-ext, But I don't know why I can get information from unchecked or removed layers from layer switcher
, I am going to popup information that will be able for only ...
1
vote
2
answers
2k
views
Why ol-layerswitcher latest version can't run in OpenLayers?
I did try load "ol-layerswitcher" in OpenLayers but It didn't work. Furthermore I tried run that through its examples in GitHub but it didn't show anything. Where is my mistake?
<!DOCTYPE html>
...
1
vote
0
answers
2k
views
OpenLayers 6.1.1 add layer to existing layer group in ol-layerswitcher
I have a productive site with OpenLayers 4.6.4 and want to switch to the actual 6.1.1 version.
Since there where changes in the code I have to adapt mine to get everything work again.
Actually I'm ...
1
vote
1
answer
298
views
OpenLayers - LayerSwitcher MattWalker not working with fetch()
I have a problem with Matt Walker's LayerSwitcher on my map construct. I use fetch () to get a WFS. Unfortunately, the LayerSwitcher does not respond to the vector and nothing is displayed in the ...
1
vote
1
answer
972
views
Display leaflet layerswitcher on click event
I would like to click on a sidebar/menu icon, and when I do the layerswitcher Icon should appear.
Right now the layerswitcher is always displayed.
I know how to make it disappear with the command
...
1
vote
0
answers
4k
views
How to add layer switch/on off layers in OpenLayers [closed]
I have configured a WMS layer into OpenLayers localhost (port 8080), I want to show a layer toggling button which can show only OSM basemap checkbox and my layers.
What is code for it how to add this ...
4
votes
3
answers
5k
views
OpenLayers layer-switcher for WMS layers
I have configured a WMS layer for OpenLayers like:
var wmsSource = new ol.source.ImageWMS({
url: 'http://<servername>/geoserver/<namespace>/wms',
params: {'LAYERS': [ 'Layer 001', '...
0
votes
1
answer
257
views
One layerswitcher option to open two wms layers
I have two WMS layers Martello_Towers and Martello_Towers_Range. Rather than have two options in Layerswitcher I would like one option to control both layers. They are both in the same projection. I'...
2
votes
1
answer
728
views
Update Bootstrap Switch with Leaflet Layer Group
I have this JSFiddle that shows two example layers that can be toggled on and off using the Bootstrap Switch to add and remove them from the map; this works fine.
The problem I am having is updating ...
1
vote
1
answer
8k
views
Leaflet, customizing the layerswitcher [closed]
So i recently decided to switch my project from Openlayers 3 to Leaflet, mainly because i needed the layer switcher control.
I followed the example on the leaflet tutorial, this one to be precise and ...
0
votes
2
answers
645
views
Toggle basemaps with CartoDB.js / CreateLayer
I would like to add a toggle control/switch for basemaps to my code. I tried something similar to this:
http://bl.ocks.org/iriberri/08abc420a376053c71d4
but it does not work in combination with ...