简体   繁体   中英

Find length of linestring in OpenLayers

I have a feature layer using OpenLayers.Control.DrawFeature with OpenLayers.Handler.Path. I want to measure the real length of the path produced. Everything I find on Google tells me to use OpenLayers.Control.Measure, but this is not what I want because it does not provide an editable path.

So how do I measure the DrawFeature line?

Thanks

没关系,有一个名为getLength()的方法可以调用以获取几何图形的长度。

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