On Oct 29, 4:04 am, Jan Jachnik <[EMAIL PROTECTED]> wrote:
> The principle of this hack is to load some HTML containing a DIV
> element with an ID of "minimap" into a GMarker tab window using the
> openInfoWindowHtml method.

Not sure if you can have an inline script within the InfoWindow HTML.
I tried to have some inline script at the end of the HTML that sets up
the minimap but it didn't seem to work on all browsers.

I also tried using the onload event on an image.  This worked on most
browsers (except Safari on windows when it doesn't work the first time
you load the page).

Add one-pixel-gif transparent image at the end of the InfoWindow HTML
with onload function
------------------------------------------------------------------
txt += "<div id='minimap'><p>Please wait for a map to load in here...</
p></div></div>";
txt += "<img src='http://upload.wikimedia.org/wikipedia/commons/c/cd/
Pixel.gif' onload='createMinimap()'/>";
marker.openInfoWindowHtml(txt);
------------------------------------------------------------------


Insert the createMinimap() function between DisplayPropertyNames() and
agroload()
------------------------------------------------------------------
function DisplayPropertyNames(obj) {
...
...
}

var centreLat = 43.935747;
var centreLng = 11.126554;

function createMinimap() {
        var minimap = new GMap2(document.getElementById("minimap"));
        minimap.setCenter(new GLatLng(centreLat, centreLng), 10);
        minimap.addControl(new GSmallMapControl());
        minimap.addControl(new GMapTypeControl());
}

function agroload()  {
...
...
}
------------------------------------------------------------------

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