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

TypeError: undefined is not an object (evaluating 'projection.fromLatLngToDivPixel') #910

Open
LeLunZ opened this issue Aug 14, 2024 · 0 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

@LeLunZ
Copy link

LeLunZ commented Aug 14, 2024

When calling clearMarkers/addMarkers relatively early after the map is initialised, a error is thrown.
It seems even though the map is initialised, markerclusterer doesn't have a valid projection.


Environment details

Markerclusterer: 2.5.3

Steps to reproduce

  1. create a markerclusterer object.
  2. register mapInitialized Callback (in the callback call .clearMarkers or addMarkers)
  3. error is thrown when callback is called

Stack trace

latLngBoundsToPixelBounds — index.esm.js:233
extendBoundsToPaddedViewport — index.esm.js:194
getPaddedViewport — index.esm.js:202
calculate — index.esm.js:567
render — index.esm.js:872
clearMarkers — index.esm.js:862

Following these steps will guarantee the quickest resolution possible.

Thanks!

@LeLunZ LeLunZ 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 Aug 14, 2024
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

1 participant