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

Fix for the coverate polygon not being removed after removing the layer #245

Closed
AndreyKozlov1984 opened this issue Sep 15, 2013 · 4 comments

Comments

@AndreyKozlov1984
Copy link

Example: http://jsfiddle.net/fdgqS/3/

Description: Move your mouse over the cluster to trigger the coverage polygon to be shown. Remove the MarkerClusterGroup from the map and add it again(as a way to redraw the map state), in the example this happens every 100ms.

Expected Result: no ghost polygons
Result: an unbound polygon is displayed on the map forever

Reason: the onRemove method for MarkerClusterGroup unbinds events first and only then it is removed. Thus map.off('layerremove', this._hideCoverageOnRemove, this); is called before the 'layerremove' event is fired.

Fix: the fix is in the javascript example, put _hideCoverage() call in the onRemove method for a MarkerClusterGroup

@danzel
Copy link
Member

danzel commented Sep 15, 2013

Looks like a bug, thanks.

@AndreyKozlov1984
Copy link
Author

Can I further help a project by making a standard jsFiddle template so anyone who wants to describe/reproduce a certain bug or misbehaviour can use it ?

On Sep 16, 2013, at 1:26 AM, Dave Leaver [email protected] wrote:

Looks like a bug, thanks.


Reply to this email directly or view it on GitHub.

@danzel
Copy link
Member

danzel commented Sep 16, 2013

yeah that'd probably be quite useful :)

@danzel
Copy link
Member

danzel commented Oct 14, 2013

Thanks, have pushed up a fix based on your change :)

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

2 participants