Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out of need #30

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open

Conversation

robertleeplummerjr
Copy link

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
Copy link
Author

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());
    });
  }
});

@OrbitalStudios
Copy link

I don't trust it.

@robertleeplummerjr
Copy link
Author

What?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants