fixed crash in android, layer not added in maps with 3D themes
Description
Using 3D themes in mapbox causes a crash in android devices. The layer index is not calculated correctly and can not be added.
The fix is to add a new layer when the calculated index is negative.
Checklist
- [x] I've read
CONTRIBUTING.md - [ ] I updated the doc/other generated code with running
yarn generatein the root folder - [ ] I have tested the new feature on
/exampleapp.- [ ] In V11 mode/ios
- [ ] In New Architecture mode/ios
- [ ] In V11 mode/android
- [ ] In New Architecture mode/android
- [ ] I added/updated a sample - if a new feature was implemented (
/example)
Screenshot OR Video
Component to reprocuce the issue you're fixing
@ignaciotcrespo thanks much for the PR, can you please add a simple standalone component reproducing the issue, thanks?
@ignaciotcrespo thanks much for the PR, can you please add a simple standalone component reproducing the issue, thanks?
hi @mfazekas it occurs exclusively on a client-specific map, which I cannot share due to proprietary restrictions.
closed, the issue is fixed not using anymore layerIndex in the RN components. We use instead only aboveLayerID and belowLayerID to set the layer position in the map.