开发者

How to add layer to OpenLayers, but without it getting automatically added in LayerSwitcher Control?

开发者 https://www.devze.com 2023-04-09 06:12 出处:网络
I have a Openlayer web map with LayerSwitcher con开发者_运维问答trol added. I need this to switch some of my layers. But I am also adding and removing some layers, which are temperory and i donot want

I have a Openlayer web map with LayerSwitcher con开发者_运维问答trol added. I need this to switch some of my layers. But I am also adding and removing some layers, which are temperory and i donot want them added to the LayerSwitcher Control. So is there a way to add layer to OpenLayers, but without it getting automatically added in LayerSwitcher Control?


Figured this out. I need to add 'displayInLayerSwitcher: false' in the layer options.

0

精彩评论

暂无评论...
验证码 换一张
取 消