Rossko, thanks for your ideas, but I don't think either of those are
the source. close() is actually used to close the window once the
user is done with it.
After changing lots of things in a pretty much random fashion, I
finally found something that worked. It seems to be a combination of
writing the popup window all in one step, plus using setTimeout to
load the map at the correct time.
================================
function summaryMap()
{
var popup = window.open('', 'popup',
'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=400');
popup.document.write('<html><head><script src="http://
maps.google.com/maps?file=api&v=2&key=ABQIAAAAnWC0yDYifGNoLe8-
Qj4E6RS-5cYl1jRs5FROpJw30fO0QEUqJRR6tlVbP7hwQapRtm3P4OLIEcFwKA"
type="text/javascript"></script><'+'script>function init(){if
(GBrowserIsCompatible()){var map = new GMap2(document.getElementById
("canvas"));map.setCenter(new GLatLng(37.4419, -122.1419),
13);map.setUIToDefault();}}<'+'/script></head><body><div id="canvas"
style="width:100%;height:100%">Under Construction</
div><'+'script>setTimeout("init();",3000)<'+'/script></body></html>');
}
//Add a map view link
document.getElementById("myDiv").innerHTML += "<a
href='javascript:summaryMap();'>Map results</a>";
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---