mapbox-gl-native-android
mapbox-gl-native-android copied to clipboard
Add clarifying docs on Style.addLayerAt
https://docs.mapbox.com/android/api/map-sdk/7.0.0/com/mapbox/mapboxsdk/maps/Style.html#addLayerAt-com.mapbox.mapboxsdk.style.layers.Layer-int-
addLayerAt is not very intuitive
- does it replace existing layers already at that index?
- how does index map to "what is on top of what"? smaller index on the bottom? small index on the top
- How can I use this to "addLayerToTheTopOfEverything"? I assumed I could just add a layer with a really large index to ensure it was always on top but then got an
CannotAddLayerException: Invalid indexerror. So what are vaild indexes?
Thanks for this ticket @tir38 . I transferred it from https://github.com/mapbox/mapbox-android-demo to this repo, which is the repo for the Maps SDK for Android. Your questions and the idea of adding more explanatory javadocs, have more to do with Maps SDK work than with specifically the demo app.