-
I am trying to migrate one of my Android apps from OsmDroid (deprecated) to Map-libre. And given that I am already using Compose I thought I might as well go with maplibre-compose (v0.10.1) and potentially gain platform independence in the future. But after spending quite a bit of time I am not getting anywhere when it comes to adding icons to the map. Been trying with SymbolLayer() but can't get that one to work. Nothing will show on the map. Tried to follow another a post here from last month, #477, with a similar issue but can't get that one to work either.
Now the Amtrac example https://maplibre.org/maplibre-compose/layers/#sources-and-layers in the docs seems to follow the "no id" for
If I blend #477 and the Amtrak example I end up with the below, but the expected blue circle doesn't show on my map
I would really appreciate if anyone could point out where I am going wrong here? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Which platform are you testing on? |
Beta Was this translation helpful? Give feedback.
-
Right now it's all Android and Android Studio as dev platform. |
Beta Was this translation helpful? Give feedback.
-
Yeah, this was a change in v0.10.0. The library now internally manages source IDs in order to avoid some crashes with order of operations when modifying styles. We may internally manage layer IDs in the future too for consistency; for now they still have the v0.9-and-below style API. |
Beta Was this translation helpful? Give feedback.
It's relevant in that's the ID of the layer when it's added to the MapLibre style, and layer IDs are not allowed to conflict. It's also the ID you'll see in the logs. Someday we may make the layer ID generated internally (like we now do for layers), which'll make the logs slightly less useful but make the API cleaner and safer.