That's because of modularization and timing.
My example uses an older API version when infoWindows were not on a
separate module.
Try calling map.getInfoWindow() as soon as you initialize the main
map, (just after map.setCenter()), so that the infoWindow gets
created.

--
Marcelo - http://maps.forum.nu
--



On Oct 6, 7:04 am, Travis Jones <[EMAIL PROTECTED]> wrote:
> I moved that code into the function and now the google map logo comes
> up, but only on the second time you open the info window and the map
> never shows, just the logo.
>
> -Travis
>
> On Oct 6, 12:53 am, marcelo <[EMAIL PROTECTED]> wrote:
>
> > When you call
> > var googleMap2Div = document.getElementById("map2");
> > the function does not get hold of the <div> because it has been called
> > from within the event handler of the click event and it is out of
> > scope.
>
> > Move the code from the function loadDetailMap2 inside the event
> > handler, like this:
>
> > GEvent.addListener(marker, "click", function() {
> >   marker.openInfoWindowHtml(html);
> >   var detailmap = new GMap2(googleMap2Div);
> >   detailmapsetCenter(marker.getLatLng());
> > // ... etc
>
> > });
>
> > Example here:http://maps.forum.nu/gm_minimap_in_infowindow.html
>
> > --
> > Marcelo -http://maps.forum.nu
> > --
--~--~---------~--~----~------------~-------~--~----~
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