Monday, July 5, 2010

Re: Delete Event Listener

On Jul 4, 12:44 pm, tazkiyah arrosyidah
<tazkiyah.arrosyi...@gmail.com> wrote:
>
> how i can delete listener too when mark in array is delete?

If there is no marker, there is nothing for an event to be triggered
on, so any listener is redundant and won't actually do anything.

If you want to remove an event listener explicitly, the easy way is to
retain a reference to it:
var myListener = GEvent.addListener(...);
GEvent.removeListener(myListener);
but there are other methods available too:
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GEvent.clearListeners

--
You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate