Error when dispose map
paolosantarsiero opened this issue · 3 comments
paolosantarsiero commented
I received this error when i try to dispose map:
Uncaught TypeError: Cannot read properties of null (reading 'init')
at WorkerBroker.postMessage (mapsjs-core.js:446:74875)
at Proxy.value (mapsjs-core.js:452:56586)
at Proxy.value (mapsjs-core.js:452:55929)
at mapsjs-core.js:454:73957
at Proxy.value (mapsjs-core.js:454:74713)
at Proxy.value (mapsjs-core.js:454:73916)
at Proxy.value (mapsjs-core.js:454:96920)
at m.i (mapsjs-core.js:374:330)
at Zd.u (mapsjs-core.js:89:583)
at m.i (mapsjs-core.js:413:200)
probably because map is in animation zoom or moviment. Is there a possibile to stop all animation camera and after dispose map?
dbacarel commented
You can try listening for the changeend event on the H.Map instance and only then dispose the map.
paolosantarsiero commented
I Just tried but It Is not working. I'm switching to HARP engine and It works very well.
dbacarel commented
my bad, the event name is mapviewchangeend.