ghettovoice / vuelayers

Web map Vue components with the power of OpenLayers
https://vuelayers.github.io/
MIT License
682 stars 230 forks source link

Uncaught TypeError: Cannot read properties of null (reading 'usedTiles') #450

Closed RickvanBerlo closed 2 years ago

RickvanBerlo commented 2 years ago

Dear reader,

When upgrading our vuelayers from version 0.12.0-rc.14 to 0.12.0-rc.26 we introduced a bug in our application. In the component <vl-view> we use the prop extent to constrain the view inside a given area. this worked perfectly in the older version but after the upgrade to the newer version, this prop is given us the error:

` Uncaught TypeError: Cannot read properties of null (reading 'usedTiles') at eval (TileLayer.js?fe5a:423) at Map.PluggableMap.handlePostRender (PluggableMap.js?27d5:953) at eval (PluggableMap.js?27d5:1230)

`

Can someone explain if this is a bug in vuelayers, openlayers 6 or a config issue in our application?

When you need more information about our environment, please ask!

ghettovoice commented 2 years ago

Hello @RickvanBerlo , I doubt that this error is related to the extent prop. Usually it means that map wasn't correctly disposed so there is still internal openlayers timers exist. (there is related issue https://github.com/openlayers/openlayers/issues/10689). VueLayers calls map.setTarget(null) from beforeDestroy Vue callback.

So, if you remove extent prop from vl-view the error is gone, right? That's interesting... Can you make a reproduce demo or describe how and where you are using vl-map?

RickvanBerlo commented 2 years ago

Hello @ghettovoice,

Thanks for your reply on this issue. The issue is only occurring when the extent prop in vl-view is included. I am sorry to inform you that I can not make a demo application for this issue. Our client does not want more time to be invested in this issue.

Maybe if i got some free time after work, i will recreate this issue. This thread can be closed! When i made a demo application i will open a new issue or reopen this thread.

Greeting!

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.