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?

8
  • Please edit the question to provide the coordinates of the line.
    – Vince
    Sep 29, 2015 at 16:43
  • @Vince i edit my question.
    – Samane
    Sep 30, 2015 at 5:10
  • If you're just clicking on the screen, graphical representation issues around pixel size and "twips" could more than explain the difference.
    – Vince
    Sep 30, 2015 at 5:15
  • 1
    @Vince No, I just clicked on the line!
    – Samane
    Sep 30, 2015 at 5:22
  • have you already set the option geodesic: true to your measure control?
    – Thomas B
    Oct 6, 2015 at 10:24

1 Answer 1

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

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.