简体   繁体   English

动态更改已加载的WMS图层的样式

[英]Dynamically change style of a WMS layer already loaded

I want to create a panel where the user will be able to change the style of a selected layer. 我想创建一个面板,用户可以在其中更改所选图层的样式。

For vector layer, there is no problem updating the ol.style config, but I don't really know how to proceed for an ImageWMS layer. 对于矢量层,更新ol.style配置没有问题,但是我真的不知道如何继续进行ImageWMS层。

Based on this post , I'm guessing I need to add a new SLD file to the layer and refresh it, but how can this be achieved with OL3 ? 根据这篇文章 ,我猜测我需要向该层添加一个新的SLD文件并刷新它,但是如何使用OL3来实现呢?

I hope this is what you are looking for 我希望这是你要找的

http://opendem.info/ol3/wms_sld.html http://opendem.info/ol3/wms_sld.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM