How to set Z-index marker on MapBox Android?

My application shows a custom marker. Basically, a userโ€™s marker shows where the current user is on the map, but I also have other markers placed on the map. In the end, it closes my custom token. I want my user token to be at the top of the map. I want it to be the last, so it appears at the very top.

Any idea?

+5
source share
2 answers

There is a solution here https://github.com/mapbox/mapbox-gl-native/pull/5294

MarkerView, MarkerViewManager#select.

mapboxMap.getMarkerViewManager().select(marker);

View#bringToFront API Android View, .

0

, :

Mapbox Android SDK:

. Mapbox Android SDK v4.1, .

mapboxMap.selectMarker(marker);

0

Source: https://habr.com/ru/post/1670006/


All Articles