On Apr 21, 1:56 am, Mike Williams <[email protected]> wrote:
> Wasn't it SteveYoungGoogle who wrote:
>
> >But I noticed something interesting, after the first forty clicks the
> >lines are drawn but if I then click on the map to set another marker
> >and then click on that marker everything works like I thought it would.
> >That is after each alert the line increases by 100m.
>
> That suggests the possibility that the API can't load the polyline
> external module during an alert(). Try adding a small invisible polyline
> to the map just after you create the map, to force the external module
> to load.
>
> --http://econym.org.uk/gmap
> The Blackpool Community Church Javascript Team

Thanks for the replies. I am pleased to see that this is still one of
the, if not the, friendliest newsgroups online.

I tried Mikes suggestion but the small additional polyline also waited
until after the forty clicks to be drawn and then with the second
marker this line was drawn straight away and the others also
correctly, ie after each click as expected.

I decided not to investigate this further for now as I only included
the alert() to slow everything down to see if the other parts were
working. So I have tried using setTimeout to slow things down as
suggested by Larry but with this only the last polyline is drawn and
the other 39 are not. Here is the change I have made (2nd line):

        myLine = new GPolyline([marker.getPoint(), point]);
        window.setTimeout("map.addOverlay(myLine)",100); //just to
slow it down to find problem

        var percentDone=100*mark/diskm;

I think I must be missing something elementary here. Your help would
be appreciated.

Regards,

Steve
--~--~---------~--~----~------------~-------~--~----~
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