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

Crash in leaflet.js when reload the map #67

Open
liviolima80 opened this issue Jan 31, 2025 · 0 comments
Open

Crash in leaflet.js when reload the map #67

liviolima80 opened this issue Jan 31, 2025 · 0 comments

Comments

@liviolima80
Copy link

Good morning,
I have found a possible bug using the library when you reload the map too quick. Let you consider your example "RealTimeMap Geometric.Points collection". If you run the server you see the map as "Home" page. Let consider the following action:

  • click on "Add more" button in "Home" page
  • click on "Counter" menu on the left
  • click agin on "Home" within 5 seconds
  • click again on "Add more" button

My behaviour is that the application crash. Using in debug the error stack trace is the following

TypeError: Cannot read properties of undefined (reading 'x')
Analisi dello stack:

at f.intersects (https://unpkg.com/[email protected]/dist/leaflet.js:5:10006)
at e._empty (https://unpkg.com/[email protected]/dist/leaflet.js:5:80140)
at e._updateCircle (https://unpkg.com/[email protected]/dist/leaflet.js:5:130722)
at e._updatePath (https://unpkg.com/[email protected]/dist/leaflet.js:5:80056)
at e._update (https://unpkg.com/[email protected]/dist/leaflet.js:5:80003)
at e._reset (https://unpkg.com/[email protected]/dist/leaflet.js:5:79030)
at e.onAdd (https://unpkg.com/[email protected]/dist/leaflet.js:5:78416)
at e._layerAdd (https://unpkg.com/[email protected]/dist/leaflet.js:5:67012)
at e.whenReady (https://unpkg.com/[email protected]/dist/leaflet.js:5:43272)
at e.addLayer (https://unpkg.com/[email protected]/dist/leaflet.js:5:67235)

If you repeat the process but you wait more than 10 seconds to come back on "Home" page to reload the map, the apllication does not crash.

I found something similar on google

https://stackoverflow.com/questions/72446783/leaflet-geojson-uncaught-typeerror-cannot-read-properties-of-undefined-reading

It look like tha map object is automatically destroyed after a while

Do you have an idea how to fix the issue?

Regards

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

1 participant