If you are not concerned that the latitude/longitude system is not a
Cartesian system, you could simply use the math formula for computing
distance:
distance = SQRT ( (x2 - x1) ^ 2 + (y2 - y1) ^2 ) and you replace xn
with longitude of nth marker and yn with latitude of nth marker.
If you want to calculate the geographic distance between two
locations, you could use the Maps API v3 Geometry Library (
http://code.google.com/apis/maps/documentation/javascript/geometry.html
)
And finally if you want to get a generic distance let's say, just for
comparing with other distances but with no consistency or meaning on
their own, you could first convert the position to a Cartesian system
position using ( map.getProjection().fromLatLngToPoint() ) then
calculate using the same formula (the Point object returned by the
method has x and y properties)
Hope this helps, have a nice day!
On Nov 17, 10:04 am, "
xinyun_0...@126.com" <
xinyun_0...@126.com>
wrote: