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
    Commented Sep 29, 2015 at 16:43
  • @Vince i edit my question.
    – Samane
    Commented 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
    Commented Sep 30, 2015 at 5:15
  • 1
    @Vince No, I just clicked on the line!
    – Samane
    Commented Sep 30, 2015 at 5:22
  • have you already set the option geodesic: true to your measure control?
    – Thomas B
    Commented 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
  • i have same problem in insertDirectionLength, How to resolve this problem???
    – Samane
    Commented Oct 7, 2015 at 9:38
  • you better post this as a seperate question
    – Thomas B
    Commented Oct 7, 2015 at 9:42
  • I asked this question: gis.stackexchange.com/questions/167673/…, please reply it!
    – Samane
    Commented Oct 27, 2015 at 5:57

Your Answer

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

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