Hi,

Sorry, the code is not available online, I will post the relevant
parts...

I try to add several event listeners to my script. Problem: Every
event fires too early.
e.g.
When I load the following code:

...

function initialize() {
         if (GBrowserIsCompatible()) {
                map = new GMap2(document.getElementById("mapId"));
                homeControl  = new HomeButtonControl();
                map.disableDragging();
                        map.removeMapType(G_HYBRID_MAP);
                map.setCenter(koordHome, 5, G_SATELLITE_MAP);
                map.addOverlay(markSagi);
                GEvent.addListener(markSagi,"click", changeView());
          }
}
function changeView(){
                alert("changeView");
}
...
<body onload="initialize()" onunload="GUnload()">
...

the alert-box appears before the map is loaded. After clicking the
'ok'-button, the map is loaded.

I have the same problem with a custom control.

GEvent.addDomListener(homeDiv, "click", function (){});

is executed, when the control gets created....

Any ideas, how to fix this?

rgds.

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