On Nov 13, 10:13 am, victor <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> first post here.
> I have been exploring based on Mike WIlliams' excellent tutorials, but
> have come across something odd.
>
> I have a page that tries to do the highlight effect shown 
> inhttp://econym.org.uk/gmap/example_map2c.htm
>
> There is only one line difference between these two 
> pages:https://dev.qonnectis.net/map/test2a.htmlhttps://dev.qonnectis.net/map/test2b.html
>
> In the '2a' page, the line that generates the side-bar
>       document.getElementById("side_bar").innerHTML = side_bar_html;
> is executed straight after the code that reads the marker defs from an
> xml file. In the 2b version there is an alert before that line.
>
> I am guessing that there is some timing issue here...? Originally I
> had a lot more markers but this test case uses only a small number.
>
> Any suggestions very welcome...
You don't understand the asynchronous nature of GDownloadUrl.  See
Mike Williams' explanation here:
Part 2 Asynchronous I/O
http://econym.org.uk/gmap/async.htm

You need to set the sidebar contents in the callback function after it
finishes processing the markers.

What happens if you don't do that is you send off the request for the
data then execute the line that fills in the sidebar (which doesn't
have any contents yet).  Sometime later the results come back from the
server, it adds the markers to the map and fills in the side_bar_html
variable, but it is never used.

See Mike's examples in his tutorial.

  -- Larry


>
> thanks,
> victor
--~--~---------~--~----~------------~-------~--~----~
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