Symbol Layer aren't displayed on Android
See original GitHub issueDescribe the bug
The symbols aren’t displayed on Android with the 7.0.1
release
It works fine on iOS
It used to work fine on the 7.0.0rc3
To Reproduce
<View>
<MapboxGL.Images images={{ assets: icons }} />
<MapboxGL.ShapeSource
id="scooters"
shape={shape(collection)}
hitbox={{ width: 10, height: 10 }}
{...props}
onPress={({ nativeEvent }) => onPress(nativeEvent.payload.properties)}
>
<MapboxGL.SymbolLayer
id="scooter"
style={styles.scooter}
minZoomLevel={minZoomLevel}
/>
</MapboxGL.ShapeSource>
</View>
Screenshots
Left: Expected -> iOS Right: Issue -> Android
Versions:
- Platfrom: Android
- Device: Honor 8X
- OS: Android 9
- SDK Version: 28
- React Native Version: 0.59.10
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Symbol Layer aren't displayed on Android · Issue #300 - GitHub
I have succed to make it work on this way neither, I have to pass the icon directly on SymbolLayer style and display...
Read more >Android Studio Mapbox Layer Problem with both Symbol ...
The problem is when the two layers SymbolLayer and CircleLayer are applied at the same time they crash the mobile app, which does...
Read more >Symbol layer icons | Maps SDK v9 | Android - Mapbox
Use a SymbolLayer to display icons on the map.
Read more >App Icons - Foundations - Human Interface Guidelines - Design
Use appropriate layer separation. If your icon includes a logo, separate the logo from the background. If your icon includes text, bring the...
Read more >Add a line layer to the map (Android SDK) - Microsoft Learn
See examples that use the Azure Maps Android SDK to add line layers to maps and to customize lines with symbols and color...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just fixed my problem. Apparently, I have not completely updated my style to the latest style specs. Older specs still work on iOS, but they do not on Android.
@tinmar33 That might be your problem!
hi, I found the doc here (not sure if adding ‘images’ to ShapeSource is deprecated or not): https://github.com/nitaliano/react-native-mapbox-gl/blob/master/docs/ShapeSource.md. Image doc (Looks like you need to add image to Image component first before using it in SymbolLayer): https://github.com/react-native-mapbox-gl/maps/blob/master/docs/Images.md Style doc: https://github.com/react-native-mapbox-gl/maps/blob/master/docs/StyleSheet.md Example: https://github.com/react-native-mapbox-gl/maps/blob/master/example/src/examples/SymbolCircleLayer/ShapeSourceIcon.js