Ticket #932 (new feature)
OpenLayers.Marker.destroy() does not call removeMarker(
| Reported by: | ePeterso2 | Owned by: | euzuro |
|---|---|---|---|
| Priority: | minor | Milestone: | Future |
| Component: | Marker | Version: | 2.4 |
| Keywords: | marker destroy removeMarker | Cc: | |
| State: |
Description
I had assumed that when a Marker's destroy() method was called that the marker would be removed from any layer to which it had been added via addMarker(). What I found is that calling destroy() without first calling removeMarker() causes much broken behavior that varies depending upon the browser. Symptoms include:
- Marker icons still appearing on the map (IE6)
- Popups associated with markers not being displayed (FF2)
- "this.icon has no properties", originating from OpenLayers.Icon.draw() while trying to draw an icon associated with a destroyed marker
Shouldn't Marker.destroy() call Layer.removeMarker() if the marker is associated with a layer?
Change History
Note: See
TracTickets for help on using
tickets.
