Skip to content

Problem when removing a marker from a map #381

Open
@jcmjcm10

Description

@jcmjcm10

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions