#2535 - Re exposing sprite field level access, but putting a null check in MarkerOptions to help guard it.
This commit is contained in:
@@ -20,7 +20,7 @@ public class Marker extends Annotation {
|
||||
LatLng position;
|
||||
private float rotation;
|
||||
private String snippet;
|
||||
private String sprite = "default_marker";
|
||||
String sprite = "default_marker";
|
||||
private String title;
|
||||
private InfoWindow infoWindow = null;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mapbox.mapboxsdk.annotations;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
|
||||
public class MarkerOptions extends AnnotationOptions {
|
||||
@@ -98,7 +99,9 @@ public class MarkerOptions extends AnnotationOptions {
|
||||
}
|
||||
|
||||
public MarkerOptions sprite(@Nullable String sprite) {
|
||||
((Marker)annotation).setSprite(sprite);
|
||||
if (!TextUtils.isEmpty(sprite)) {
|
||||
((Marker)annotation).sprite = sprite;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user