OverlappingMarkerSpiderfier-Leaflet icon indicating copy to clipboard operation
OverlappingMarkerSpiderfier-Leaflet copied to clipboard

out of need

Open robertleeplummerjr opened this issue 8 years ago • 3 comments

Thank you for this fine library. I did some cleanup and modernization to it in hopes that it would help me and thought I'd offer it if needed.

Thanks again.

robertleeplummerjr avatar Jun 04 '16 18:06 robertleeplummerjr

I went ahead and created a full fledged control that should make reuse pretty easy and simplified some of the terminology. You can now do this with this branch:

L.spiderfy({
  map: map,
  markers: markers,
  click: function(marker) {
    popup.setContent(marker.desc);
    popup.setLatLng(marker.getLatLng());
    map.openPopup(popup);
  },
  activate: function(markers) {
    markers.forEach(function(marker) {
      marker.setIcon(new LightIcon());
    });
    map.closePopup();
  },
  deactivate: function(markers) {
    markers.forEach(function(marker) {
      marker.setIcon(new DarkIcon());
    });
  }
});

robertleeplummerjr avatar Jun 30 '16 01:06 robertleeplummerjr

I don't trust it.

OrbitalStudios avatar Aug 18 '16 01:08 OrbitalStudios

What?

robertleeplummerjr avatar Aug 18 '16 13:08 robertleeplummerjr