hi,

thank you for your help, I filled in the new code, but the displayed
distance is only 300 and some kilometers. Can you look for the
failure?

Thanks

On 29 Sep., 17:05, Mike Williams <[EMAIL PROTECTED]> wrote:
> Wasn't it uncleshigga who wrote:
>
>
>
> >Hi thank you all, but could someone please look at my code and tell me
> >where to put and how to display the distance on my website?
>
> See the line that says
> map.addOverlay(new GPolyline(pts,colour,width));
>
> Replace that with
>
> var poly = new GPolyline(pts,colour,width);
> var kilometers = poly.getLength()/1000;
> map.addOverlay(poly);
>
> Decide which HTML element you want to display the information in and
> write
>
> document.getElementById("foo").innerHTML =
>      "The total distance is " + kilometers +"km.";
>
> --http://econym.org.uk/gmap
> The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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