you can use distanceFrom with the GLatLng from the post code marker and the
original clicked like this

var originLatLng = marker1.getLatLng();
var destLatLng = marker2.getLatLng();
var distance = originLatLng.distanceFrom(destLatLng);

regards

On Tue, Nov 23, 2010 at 8:57 AM, adam messenger <[email protected]>wrote:

> I have added a map (which has 4 markers) that i have created in google maps
> to my web page. Also on my webpage i have an edit field and a button. i
> enter a postcode and then click the button and a marker appears on the map
> at the location of the post code that i have entered.
>
> Is it possible so that when i click on one of the 4 original markers on my
> map, in the pop up window it displays the distance (in a straight line) from
> my post code marker location to the marker i have clicked.
>
> thank you in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps API V2" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api?hl=en.
>



-- 
Marcelo Andrés Pinto Bravo

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to