如何获取OpenLayers中的多边形坐标 [英] how to get coordinates of a polygon in OpenLayers
本文介绍了如何获取OpenLayers中的多边形坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
比方说,我已经创建了一个多边形,就像一个多边形一样。我一直在寻找如何确定OpenLayers中由多边形(特征)构成的点的坐标。在这个示例中。我需要知道由多边形组成的点,所以我可以将它们保存在某个地方。
我敢打赌,这很容易。我只是找不到任何东西,可能我不知道应该搜索什么。
预先感谢。
解决方案
vectors.features [0] .geometry.getVertices()
I have been looking for how to determine coordinates of the points which consist a polygon(feature) in OpenLayers.
Let's say I have created a polygon like the one in this example. I need to know the points which consist the polygon, so I can save them somewhere.
I bet it is an easy one. I just couldn't find anything, probably I don't know what I should search for.
Thanks in advance.
解决方案
vectors.features[0].geometry.getVertices()
这篇关于如何获取OpenLayers中的多边形坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文