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

Removing individual markers from map at the end of animation #11

Open
ghost opened this issue Jan 15, 2016 · 0 comments
Open

Removing individual markers from map at the end of animation #11

ghost opened this issue Jan 15, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 15, 2016

I'm having a hard time removing each individual marker from the map as soon as they stop. Tried using methods isEnded() and end without much sucess. With (end), the following code removes only but one marker (I am guessing that it is removing the first to stop). Full code here:

marker.on('end', function() {
  map.removeLayer(this);
  });

With a click event instead of an end event, each marker is made easily removable, but then this is not what I am looking for:

marker.on('click', function() {
  map.removeLayer(this);
  });

What am I missing here?

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

No branches or pull requests

0 participants