Ticket #855 (closed feature: fixed)

Opened 6 years ago

Last modified 6 years ago

addMarker() doesn't display a marker that was previously removed

Reported by: openlayers Owned by: euzuro
Priority: trivial Milestone: 2.5 Release
Component: Layer.Markers Version: 2.4
Keywords: Cc:
State:

Description

If you do:

layer.addMarker(marker); layer.removeMarker(marker); layer.addMarker(marker);

then marker doesn't get drawn on the map!

This is because removeMarker() doesn't mark the marker as not drawn, making the 2nd addMarker() call think marker is already drawn.

Attached patch fixes the problem. Test added in the patch.

Attachments

patch-removeMarker.txt Download (2.1 KB) - added by openlayers 6 years ago.

Change History

Changed 6 years ago by openlayers

Changed 6 years ago by euzuro

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 2.5 Release

patch and tests are great

committed with r3784

Note: See TracTickets for help on using tickets.