On Nov 24, 5:16 pm, Rossko <[EMAIL PROTECTED]> wrote:
> > In http://www.brummiesfans.com/googlemaps/test3.html  I got the "More"
> > and "Trafic" toggle buttons to work, but in
> > http://www.brummiesfans.com/googlemaps/test4.html
> > (the new one using EGeoXml) these buttons don't appear.
> >
> > I suspect that it has something to do with all the Javascript in /
> > test3.html  being in the head, whereas in /test4.html all the code is
> > in the body, and in copying / pasting from one to the other, I've
> > missed something, and for the life of me, I can't see what it is. Of
> > course, my suspicion may be way off the mark, and it could be
> > something else altogether. If anyone can see what the problem is, I'm
> > all ears...

Compare the code in the 2 pages.  In the first page the functions to
define those controls are defined inline after the buildMap function,
but since the buildMap function is executed onload, they occur first.
In the second page, they execute after they are needed.

> > ... I did try placing
> > this script into the <head> but that only produced errors when giving
> > it a function name, calling the function onload in <body> and then
> > trying to get an InfoWindow to display. The map was there, all the map
> > pins were there, but nothing happened when they were clicked.

The main issue is you need to understand the code and what it is doing
when to get it to work...

>
> I would guess that when you put your map-making into a function to be
> called onload, you didn't set up the map object to remain in the
> global scope.  So after the function completed, the map object was no
> longer available to e.g. onclick function.

The code is available at the link he provided, no need to guess.

> > In deciding where to locate the code, please bear in mind that the
> > next stage of this is to introduce tabbed InfoWindows, and all the
> > current InfoWindow content will need to go into "tab 1" of a choice of
> > what will become 3 or 4 tabs per InfoWindow.

That should be irrelevant.  The code should work in either place as
long as adjustments are made for where you put it.

  -- Larry

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