Skip to content

Commit

Permalink
Merge pull request #2320 from fqborges/fix-marker-updates
Browse files Browse the repository at this point in the history
Fix custom marker updates on android #1611 #2048
  • Loading branch information
alvelig committed Jun 12, 2018
2 parents e9618d4 + c8b5ac1 commit 4a2b453
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -300,8 +300,10 @@ public void setImage(String uri) {

public MarkerOptions getMarkerOptions() {
if (markerOptions == null) {
markerOptions = createMarkerOptions();
markerOptions = new MarkerOptions();
}

fillMarkerOptions(markerOptions);
return markerOptions;
}

Expand Down Expand Up @@ -355,8 +357,8 @@ private BitmapDescriptor getIcon() {
}
}

private MarkerOptions createMarkerOptions() {
MarkerOptions options = new MarkerOptions().position(position);
private MarkerOptions fillMarkerOptions(MarkerOptions options) {
options.position(position);
if (anchorIsSet) options.anchor(anchorX, anchorY);
if (calloutAnchorIsSet) options.infoWindowAnchor(calloutAnchorX, calloutAnchorY);
options.title(title);
Expand Down

0 comments on commit 4a2b453

Please sign in to comment.