如何在OL3中使用SLD设置图层样式 [英] How to style layers with SLD in OL3

查看:244
本文介绍了如何在OL3中使用SLD设置图层样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎不久前在OL2中有一种使用SLD设置图层样式的好方法,而且现在看来不可能在OL3中执行类似的操作.至少,我在网络上找不到任何示例,在正式的OL3文档中,甚至找不到对SLD的单个引用.那么,为什么呢?如果不再支持SLD格式,现实世界中的人们如何存储/保存样式?

It seems like not long ago in OL2 there was a nice way to style layers with SLD and it seems like now it is not possible to do the similar thing in OL3. At least, I could not find any example on the web and in official OL3 documentation I could not find even a single reference to SLD. So, why is that and how people in real world applications store/save styles if SLD format is not supported any more?

推荐答案

SLD 尚不受支持OpenLayers 3 .我目前正在为Mapbox-gl-style规范开发OpenLayers 3支持: ol-mapbox- gl样式.这是一个小型的独立图书馆.

SLD is not yet supported by OpenLayers 3. I am currently working on OpenLayers 3 support for the mapbox-gl-style spec: ol-mapbox-gl-style. It is a small separate library.

可能已经有一个SLD到mapbox-gl样式的转换器.如果没有时间做完,那么应该有足够的资金来开发SLD转换器.

There might already be an SLD to mapbox-gl-style converter. If there isn't by the time I'm done, there should be enough funding left to also work on an SLD converter.

信贷无边及其客户为这项工作提供资金.

Credit goes to Boundless and their customers for funding this effort.

这篇关于如何在OL3中使用SLD设置图层样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆