Turbo87 / sidebar-v2

A responsive sidebar with tabs for Leaflet, OpenLayers, Google Maps, ...

Home Page:https://turbo87.github.io/sidebar-v2/examples/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Choose the which layers to load when open the html

mgzjys opened this issue · comments

I am currently using this tool for openlayers. I have four tiled layers from geoserver and was wondering if it is possible to select one of the layers to load when I opened my html.

Currently, when I am open the html file, all the four tiled layers were loaded to the page.

Does anyone happened to know how to do that? Or is it possible to tell the sidebar to unload the rest of the layers.

Thanks a lot.

It is not entirely clear to me how you think this this relates to the sidebar functionality? That is configuration of the openlayers map/viewer, no?

In openlayers when creating a layer you either specify the parameter visible to control if the layer is visible.
Or after creation of the layer, one can do layer.setVisible(false).