I would like to create a single map that has different listeners
depending on a menu choice from another div. One thought is
conditionally identify the listeners:
basic map code...
if(menuChoice=='1') {
GEvent.addListener(map1, 'click', mapClick1);
} else {
GEvent.addListener(map1, 'click', mapClick2);
}
I had always assumed that when the map was loaded all associated
listener's were loaded and that you could not dynamically reselect the
ones you want executed at runtime. Instead, one would have to remove
the listeners "GEvent.removeListener(handle)" and add new ones as
required. Is this the best way?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---