0

I have loaded the following raster into geoserver and added measurement control. The thing is that the measure gives me wrong result (it shows the car length is 49m) Any idea what can cause this ?!

For the code , I used the generated code from "Preview Layer" in geoserver and just added the dynamic measure control to it.

enter image description here

2

Try to set the geodesic property to true when you create the Measure control.

According to the OpenLayers documentation the geodesic property is used to:

Calculate geodesic metrics instead of planar metrics. This requires that geometries can be transformed into Geographic/WGS84 (if that is not already the map projection).

  • Tried that , I gives me now 77KM length for a car. – Alophind Nov 11 '13 at 20:57
  • Then we need to know a bit more about your setup. What is the srs of your layer and can you show some code. In particular the code where you define the map with options, the layer and the measurement control. The generated code from "Preview Layer" in geoserver could be different depending on the verison of GeoServer. – taudorf Nov 12 '13 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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