how to measure distance on umap

32 views
Skip to first unread message

Yu CS

unread,
Jun 30, 2010, 10:30:44 PM6/30/10
to UMapper
how to measure distance on umap? can someone give me some demo code?
thank you

Andrei

unread,
Jul 1, 2010, 3:21:55 PM7/1/10
to UMapper
You can use getDistance method if UMap projection:
http://www.umapper.com/content/docs/api/umap_as3/com/afcomponents/umap/control/projection/Projection.html

Here is how:

var distance:Number = getDistance(pointA:LatLng, pointB:LatLng);

Keep in mind that distance is returned in KM but you can convert it to
miles like this:

var distance:Number = (getDistance(pointA:LatLng,
pointB:LatLng)*0.621371192);

Cheers,
Andrei

Yu CS

unread,
Jul 2, 2010, 10:37:47 AM7/2/10
to UMapper
thanks for you replay
Reply all
Reply to author
Forward
0 new messages