There's two things going on:
1. On the example that works, the size of the map2 div is handled by a
CSS style sheet. In your version the size is handled by an inline style.
There's a subtle timing effect that causes the sizing to be slightly
delayed, so at the rime that you create your detailmap, the browser
things that it has zero size.
You can fix that either by using a CSS style sheet, by delaying your
creation of the detailmap, or by specifying {size:new GSize(200,200)}
when you create the detailmap.
2. The second thing affects both your code and the example that "works".
The infowindow code has now been modularised. The first time you make a
call to the info window code, there's a delay while the module gets
loaded asynchronously. You can't reference elements that are going to be
inside the infowindow until the module has finished loading.
Unfortunately, there's no event or callback that tells you when the
module has loaded, and it's therefore safe to reference the infowindow
contents.
The workround is to perform
map.getInfoWindow().show();
just after you .setCenter() your main map. GInfowindow.show() is
implemented inside the module, and therefore forces the module to be
loaded without actually displaying anything. Most other calls that don't
display anything, like map.closeInfoWIndow() and map.getInfoWindow() are
implemented in main.js and don't cause the module to be loaded.
--
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
-~----------~----~----~----~------~----~------~--~---