I am working on a thematic mapping platform showing data at local administrative levels. I have many layers, so I run into problems (see screenshot: http://gisintersect.com/many_layers.png).

Is there any way I can collapse groups of layers within the layer switcher? I have a high number of layers, as you can see in the switcher. Hence, I need some way to collapse/group/categorize the layers, so that I do not need to show all of them in the layerswitcher at once. The result is that layers drop outside the map, so either, there is a maximum number of layers, or there should be a better way to do it.

  • This isn't the answer you are looking for, but don't show so many layers. Not only will you face problems in the Layer switcher, but you'll also have performance issues. If many layers are on, and you pan/zoom the map many requests will be sent to the server, your application will be horrendously slow. If you still want to persist with these many layers, you'll have to make a custom layer switcher with a treeview, or use something like GeoExt – Devdatta Tengshe Sep 19 '14 at 2:54
  • Thanks. I have a custom layerswitcher script that changes it, so that only one layer can be active at the time. I will look into GeoExt. Thanks – spesseh Sep 19 '14 at 16:24
  • looking for similar info. any luck with your quest? – tony gil Jul 19 '17 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.