mirror of
https://github.com/status-im/react-native-mapbox-gl.git
synced 2026-08-30 20:41:08 +00:00
Added width to the check for annotation image size specification
This commit is contained in:
+1
-1
@@ -135,7 +135,7 @@ public class ReactNativeMapboxGLManager extends SimpleViewManager<MapView> {
|
||||
SpriteFactory spriteFactory = view.getSpriteFactory();
|
||||
Sprite icon;
|
||||
|
||||
if (annotationImage.hasKey("height")) {
|
||||
if (annotationImage.hasKey("height") && annotationImage.hasKey("width")) {
|
||||
int height = annotationImage.getInt("height");
|
||||
int width = annotationImage.getInt("width");
|
||||
icon = spriteFactory.fromDrawable(image, width, height);
|
||||
|
||||
Reference in New Issue
Block a user