[OpenLayers-Users] geometry.getLength() returns what format

Christopher Schmidt crschmidt at metacarta.com
Wed Sep 5 15:31:15 EDT 2007


On Wed, Sep 05, 2007 at 02:00:49PM -0500, Chris Hardin wrote:
> What does getLength() on the geometry object? Is this measurement in
> degrees? I need to convert to mileage or Kilometers.

This measurement is in map units. If you want it in miles, you're going
to want to look at:

http://dev.openlayers.org/sandbox/tschaub/feature/examples/measure.html
http://dev.openlayers.org/sandbox/tschaub/feature/lib/OpenLayers/Control/Measure.js

(I do not think these will be in 2.5.)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list