-
I'm trying to use a symbol layer to show a dynamic location on the map, but I'm getting a crash with iOS (works on Android). I'm not sure if I'm doing something wrong or not; I was hoping someone could either tell me how I'm calling MapLibre incorrectly, or let me know it's a bug so I can write up an issue. In the onStyleLoadedCallback, I have:
I'm adding the source here so I can call The crash comes when I use _symbolSource as the sourceId in the addLayer call; the _symbolSource value ("sensor_location") shows in an error message of Source sensor_location already exists. ... and here's the full stack trace:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
This seems like a bug. It seems that the layer is not actually deleted when Can you try to wait a second between the first and the second line of your snippet (e.g. with |
Beta Was this translation helpful? Give feedback.
Got my code working by removing the layer using the source before removing the source.
It looks like the source can't be removed if it's on a layer; this was failing the 2nd time my onStyleLoadedCallback was called.