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

Problem when removing a marker from a map #381

Open
jcmjcm10 opened this issue Apr 11, 2024 · 0 comments
Open

Problem when removing a marker from a map #381

jcmjcm10 opened this issue Apr 11, 2024 · 0 comments

Comments

@jcmjcm10
Copy link

Hi,

I've created a very simple example of adding and removing a marker. I need to use toRaw in order to workaround the problem, but I don't see any example in the documentation using toRaw, so probably I'm doing something wrong of there is a bug somewhere.

Please see the example here and try to zoom in/out:
https://codesandbox.io/p/sandbox/vue3-leaflet-forked-m8lz8g

You'll get this message:
Cannot read properties of null (reading '_latLngToNewLayerPoint')

Now comment out the code where toRaw is not used, and see the error does not happen.

Can you please explain why I need to use toRaw?

Thanks!

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