Added width to the check for annotation image size specification

This commit is contained in:
Aiden Montgomery
2016-01-09 18:37:45 +00:00
parent fa3f9a1723
commit d51fc20823
@@ -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);