On Tue, Jun 8, 2010 at 9:58 AM, Berwyn <[email protected]> wrote:

> I have a question about removing markers.
>
> when setMap(null) is used, is the marker actually removed from the dom
> or is it just hidden?
>

The marker is removed from the DOM.


> For several placemarks are there several event dom listeners set up?
> Or is there a single map event listener that inspects the event to see
> if it originates from a placemark object?
>

At present we create event DOM listeners per marker.  That can be slow, so
we're looking into creating 1 DOM listener on a parent element.


> Also are any event listeners associated with the object removed when
> setMap(null) is used? or does one need to keep track of events and
> remove them using removeListener?
>

The DOM event listeners associated with the object are removed when
.setMap(null) is called.  If you then release the Marker instance then it
will be garbage-collected, along with any event listeners that it created.
 Releasing the Marker instance includes removing any event listeners that
you added.

Cheers
Ben

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to