有没有办法使用 OpenLayers 更改 openstreetmap 中某些要素的颜色?
我正在使用 OpenLayers 来显示 openstreetmap。有没有办法编辑地图上的某些功能?例如改变水的颜色、消除国家之间的边界等。如果不能使用 JavaScript 来完成,我猜还有其他方法可以做到这一点 - 比如托管您自己的地图版本,然后您可以对其进行编辑只要你想要的。
有人尝试过这样的事情吗?我该怎么做呢?
谢谢
I'm using OpenLayers to display an openstreetmap. Is there a way to edit certain features on the map? For example changing the color of the water, removing the border between countries etc. If it can not be done using JavaScript, I'm guessing there are other ways to do this - like hosting your own version of the map which you can then edit as much as you want.
Has anyone tried something like this? How would I go about doing this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,您无法更改 OpenLayers.Layer.OSM 中的颜色,因为它会渲染死图像,并在服务器端应用所有样式。运用自己风格的唯一方法就是亲自主持 osm。以下教程将帮助您入门。
No, you can't change colors in OpenLayers.Layer.OSM because it's rendered dead images with all styling applied on the server-side. Only way to apply your own style is to host osm yourself. Here's the tutorial that will help you get started.