简体   繁体   中英

how to get coordinates of a polygon in OpenLayers

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()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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