Skip to content

Commit c7c98ee

Browse files
committedJun 11, 2018
Fix custom marker updates on android react-native-maps#1611 react-native-maps#2048
1 parent 24d5237 commit c7c98ee

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎lib/android/src/main/java/com/airbnb/android/react/maps/AirMapMarker.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,10 @@ public void setImage(String uri) {
300300

301301
public MarkerOptions getMarkerOptions() {
302302
if (markerOptions == null) {
303-
markerOptions = createMarkerOptions();
303+
markerOptions = new MarkerOptions();
304304
}
305+
306+
fillMarkerOptions(markerOptions);
305307
return markerOptions;
306308
}
307309

@@ -355,8 +357,8 @@ private BitmapDescriptor getIcon() {
355357
}
356358
}
357359

358-
private MarkerOptions createMarkerOptions() {
359-
MarkerOptions options = new MarkerOptions().position(position);
360+
private MarkerOptions fillMarkerOptions(MarkerOptions options) {
361+
options.position(position);
360362
if (anchorIsSet) options.anchor(anchorX, anchorY);
361363
if (calloutAnchorIsSet) options.infoWindowAnchor(calloutAnchorX, calloutAnchorY);
362364
options.title(title);

0 commit comments

Comments
 (0)