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

Migration Feedback #305

Open
aavmurphy opened this issue Apr 24, 2022 · 3 comments
Open

Migration Feedback #305

aavmurphy opened this issue Apr 24, 2022 · 3 comments
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@aavmurphy
Copy link

[Sorry for multiple points in the same issue]
Migrating from (depreciated) https://github.com/mahnunchik/markerclustererplus to v2.0.4

  1. More documentation in README please, with examples of calling each cluster algorithm & each render algorithm,
  • explain differences between them
  • give calling options for them.
  1. Slower... seemed to be lots of re-rendering. (12,000 markers). Maybe load markers into memory, do the clustering once at each zoom level, then just render on the map as you pan close.
  2. After showing/hiding markers with [marker].setVisible(), I called .render() to redraw - it just didn't work, cluster-total's were wrong, saw a cluster-total of 1 one time. Thinking about it, I needed to re-cluster, then re-render. Maybe add an example of this to the documentation as a migration point.
  3. Use cdnjs (or a google version of it)
    Hope this helps.
@aavmurphy aavmurphy added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Apr 24, 2022
@jpoehnelt
Copy link
Contributor

@aavmurphy Thank you for opening this issue. 🙏
Please check out these other resources that might be applicable:

This is an automated message, feel free to ignore.

@jpoehnelt
Copy link
Contributor

Thanks for capturing these. There are definitely some tradeoffs that were made and I think this library was an early attempt to provide the flexibility that was lacking in previous versions.

One of the questions going forward will be additional forms of rendering. The previous marker clustering implementation used google.maps.OverlayView and had significant challenges around a11y that were blockers for many customers. The rendering of the clusters had also fallen into the trap of a leaky abstraction. Should we provide renderers that use WebGLOverlayView for instance, or OverlayView where the renderer returns a HTMLElement?

Another question is the input data. It's difficult to support all of the edge cases around visibility, setMap, etc as captured in #267. Should we allow something like geojson?

As to speed, markers are definitely the bottleneck on both ends however there is ongoing work that may improve this on the rendering side.

Already available at unpkg.

<script src="https://unpkg.com/@googlemaps/markerclusterer/dist/index.min.js"></script>

Anyone can submit a pr to have support in CDNJS. https://github.com/cdnjs/packages

@jpoehnelt jpoehnelt removed their assignment Jun 17, 2022
@aavmurphy
Copy link
Author

An update, checking if I can upgrade to the current (2.5.3) version from legacy clusterer https://github.com/mahnunchik/markerclustererplus

The points I made above are still valid

  • still much slower - its takes a while to first render the page - but once it does, performance is fine.
  • documentation still needed, for example, several examples of algorithm options would be very nice - I had to hunt thru auto-generated doco to find a link to them elsewhere.
  • played around (the page load time was noticeable each time) but didn't find a combination minPoints and radius that quite worked

(Note : I was using Advanced Markers when testing, the legacy clusterer doesn't support them)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants