Please give me the exact HTML to have this code provide the pop-up
window when the page loads instead of when clicked on - can't figure
it out.
//<![CDATA[
if (GBrowserIsCompatible()) {
function createMarker(point,html) {
// FF 1.5 fix
html = '<div style="white-space:nowrap;">' + html + '</div>';
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
var map = new GMap(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.centerAndZoom(new GPoint(-79.359741, 43.907787), 8);
var point = new GPoint(-79.90138, 43.65654);
var marker = createMarker(point,'Testing 1234')
map.addOverlay(marker);
}
else {
alert("Sorry, the Google Maps API is not compatible with this browser");
}
//]]> |