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

PrepareView moves marker after toggling filtered properties on two markers in same cluster #11

Closed
johnmcase opened this issue Aug 8, 2014 · 5 comments
Labels
Milestone

Comments

@johnmcase
Copy link
Contributor

Steps to reproduce:

  1. Create two markers close enough so that they are clustered together at a particular zoom level.
  2. Set the 'filtered' property on one of them to true
  3. call ProcessView()
  4. Toggle the filtered properties on both markers
  5. call ProcessView() again

The visible marker will slide over to where the hidden marker was.

The expected behavior should be that the visible marker becomes hidden and the hidden marker becomes visible.

This becomes a significant problem in scenarios where the two markers have different leaflet icons.

Fiddle: http://jsfiddle.net/johnmcase/y08v84mc/

@fungiboletus fungiboletus added this to the 1.0.0 milestone Aug 9, 2014
@fungiboletus
Copy link
Member

Hello.
Thanks a lot for your good report. It's a pretty serious bug.

I think the bug appears not only with the filtering, but also when you add and remove markers, or even in a uncommon case when the markers are moving.

The problems :

  • The L.Marker object is recycled but the transition is confusing. The library should not recycle leaflet markers when the prunecluster marker behind is different.
  • (or) The PrepareLeafletMarker is called only when the zoom level has changed. It should be called when the prunecluster marker is different too.

I will work on it the next week ASAP.

@johnmcase
Copy link
Contributor Author

Any update on this?

@fungiboletus
Copy link
Member

Sadly no. I have more work than expected on other tasks these days and I want to fix this problem correctly. It looks like a conception issue on the LeafletAdapter.

I will not give a date this time but I can say "as soon as possible".

@ghost
Copy link

ghost commented Aug 26, 2014

👍

@fungiboletus
Copy link
Member

The hashcode system seems to work fine and it's available in the 0.9.0 version.

I will wait a bit before creating the 1.0.0 tag.

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

No branches or pull requests

2 participants