mapbox / mapbox-android-demo

Google Play demo app for the Mapbox Maps SDK for Android
https://play.google.com/store/apps/details?id=com.mapbox.mapboxandroiddemo
BSD 2-Clause "Simplified" License
719 stars 493 forks source link

Adding Symbol Layer below Location Component #1404

Closed imagineDev closed 3 years ago

imagineDev commented 3 years ago

The use case is that I want to lazy load icons (via Symbol Layer) on the map. These icons represent Road conditions like Potholes, etc.

I want the current location marker to be always above any Geometry I draw on the map, in this case icons.

I tried to achive that by adding my Symbol Layer first and then activating the Location Component, it worked fine but as soon as I change the style of the map, current location is again at the bottom. I do add my Symbol Layer again inside after onDidFinishLoadingStyle callback.

Can anyone share any best practices/ solution for this?