2

My map projection is: "EPSG:900913" ,Display projection is "EPSG:4326" and units is "m", however does not equal the length is calculated in OpenLayers with ArcGIS, in fact Openlayers show the length more than the actual length when i use measure control.

For example:

the calculation length in ArcGIS is:26,072.443575 

enter image description here

and in OpenLayers is: 3.0757.

enter image description here

How to resolve this problem?

Samane
  • 989
  • 6
  • 23

1 Answers1

1

As you are using DynamicMeasure( github.com/jorix/OL-DynamicMeasure ) you can also use geodesic:true to get better results:

var measureControls = {
        line: new OpenLayers.Control.DynamicMeasure(OpenLayers.Handler.Path)

    };

measureControls.line.geodesic=true;

measureControls.line.activate();

I just forked the repository and added an option to switch geodesic:true on interactively:

http://rawgit.com/neogis-de/OL-DynamicMeasure/geodesic/examples/measure-dynamic.html

Thomas B
  • 8,807
  • 1
  • 21
  • 62
  • i have same problem in insertDirectionLength, How to resolve this problem??? – Samane Oct 07 '15 at 09:38
  • you better post this as a seperate question – Thomas B Oct 07 '15 at 09:42
  • I asked this question: http://gis.stackexchange.com/questions/167673/why-does-not-equal-length-of-line-in-direction-length-with-length-of-line-in-mea?noredirect=1#comment249639_167673, please reply it! – Samane Oct 27 '15 at 05:57