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

[Bug] Pinmap popup for spiderfied markerclusters #461

Closed
1 task
adamkendis opened this issue Mar 25, 2020 · 4 comments
Closed
1 task

[Bug] Pinmap popup for spiderfied markerclusters #461

adamkendis opened this issue Mar 25, 2020 · 4 comments
Assignees
Labels
Bug Something isn't working Complexity: Missing This ticket needs a complexity (good first issue, small, medium, or large) Feature: Missing Role: Frontend React front end work size: Missing v1 The first version of the site

Comments

@adamkendis
Copy link
Member

Description

Multiple reports at the same address or lat/lng cluster on the pinmap. Clicking the cluster spiderfies the stacked pins. Clicking an individual pin in a spiderfied cluster displays the loading popup. When the popup is updated with the srnumber info, the spiderfied cluster auto-collapses and the popup is not visible. The user has to click the cluster and the same pin again to view the popup. The cluster should stay expanded and the popup should be immediately visible on successful pin info fetch.

Action Items

  • Fix spiderfied clusters so they don't auto-collapse when the pininfo popup loads.

Resources

Expanded spiderfied cluster (markercluster already clicked):
Screen Shot 2020-03-24 at 5 23 01 PM

Auto-collapses when srnumber info is loaded (wrong behavior):
Screen Shot 2020-03-24 at 5 23 10 PM

Should stay expanded and display PinPopup (correct behavior):
Screen Shot 2020-03-24 at 5 24 33 PM

@adamkendis adamkendis added Bug Something isn't working Role: Frontend React front end work labels Mar 25, 2020
@johnr54321 johnr54321 added this to the 311-Data - Beta milestone May 7, 2020
@adamkendis
Copy link
Member Author

Pins and clustering reworked in #575 . Closing ticket as the bug does not exist in current implementation.

@adamkendis adamkendis reopened this May 24, 2020
@adamkendis adamkendis self-assigned this Jun 16, 2020
@adamkendis
Copy link
Member Author

In progress - will be completed by end of week, 7/5.

@adamkendis
Copy link
Member Author

Dev notes 7/30: This is still unresolved and in progress.

What has been done so far:

  1. Dug into leaflet.markercluster source code. Attempt to obtain spiderfied marker's parent cluster in order to re-spread the cluster after the marker's popup data is updated with the 311 request info. See this post. This seems like a potentially volatile solution that could break on leaflet updates. Still investigating.

  2. Removed react-leaflet-markercluster for handling stacked pins and installed overlapping-marker-spiderfier-leaflet. Implemented MarkerSpiderfier. This does not cluster stacked pins, but does handle spreading stacked pins. Not 100% working at the moment. The first time a stacked group of pins is clicked it spiderfies then immediately collapses, however, the legs remain visible. Spreading stacked pins works as expected on subsequent clicks. The popup DOES stay open and display the 311 data once received from the server, which is better than the leaflet.markercluster implementation.

Additional ideas:

  1. Instead of clustering/spiderfying stacked pins, shift stacked pins around a focal point on render. Done via CSS or tweaking stacked marker's lat/lng to circle or spiral a point. No clustering/spreading.

  2. Look into refactoring PinPopup. Found several examples online of popups working correctly with spiderfied clusters, but none with dynamic popup content.

@adamkendis
Copy link
Member Author

Mooted by elimination of clusters.

@github-project-automation github-project-automation bot moved this to Done (without merge) in P: 311: Project Board Aug 22, 2024
@ExperimentsInHonesty ExperimentsInHonesty added the v1 The first version of the site label Aug 22, 2024
@cottonchristopher cottonchristopher added the Complexity: Missing This ticket needs a complexity (good first issue, small, medium, or large) label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Complexity: Missing This ticket needs a complexity (good first issue, small, medium, or large) Feature: Missing Role: Frontend React front end work size: Missing v1 The first version of the site
Projects
Status: Done (without merge)
Development

No branches or pull requests

4 participants