在OpenLayers 2.13中,为什么在DIRECTION / LENGTH中的行长度与MEASURING中的行长不等?

时间:2015-10-25 06:43:35

标签: openlayers measurement

我的地图投影为:“EPSG:900913”,显示投影为“EPSG:4326”,单位为“m”,但不等于 Direction/length 中的长度长度在OpenLayers中以 measuring 计算,事实上,当我使用度量控制时,Openlayers显示的长度超过实际长度。 我已将选项geodesic: true设置为我的度量控件。

例如:

the enter length is: 100m

direction/length

the length after measuring is: 85.29m

enter image description here

定义度量控制:

measureLine = new OpenLayers.Control.DynamicMeasure(OpenLayers.Handler.Path);
measureLine.geodesic = true;

function insertDirectionLength(drawType) {
    var values = parseInput(
        window.prompt(
                "Enter direction and length offset values for new point (e.g. '-45, 10')", "direction, length"
        )
     );
     if (values != null) {
         var controlKey,key;
         for (key in controls) {
             controlKey = controls[key];
             if (drawType == key) {
                  controlKey.insertDirectionLength(values[0], values[1]);
             } 
         }
     }
 }

如何解决此问题?请帮帮我。

0 个答案:

没有答案