[英]Find length of linestring in OpenLayers
I have a feature layer using OpenLayers.Control.DrawFeature with OpenLayers.Handler.Path. 我有一个使用OpenLayers.Control.DrawFeature和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.
我在Google上找到的所有内容都告诉我使用OpenLayers.Control.Measure,但这不是我想要的,因为它不提供可编辑的路径。
So how do I measure the DrawFeature line? 那么如何测量DrawFeature线?
Thanks 谢谢
没关系,有一个名为getLength()的方法可以调用以获取几何图形的长度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.