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?