Issue
Using Google Maps Android API v2, I can update my marker's position by getting the Marker
from a hashMap and then calling:
Marker marker = hashMap.get(someId);
marker.setTitle("Title");
marker.setSnippet("Snippet");
marker.setPosition(new LatLng(newLatitude, newLongitude));
However, if the marker is selected when this is called, the title and snippet will only update if I click off the marker and reselect it. Is there anyway to tell the map to refresh the data in the marker bubble?
Solution
Call hideInfoWindow()
immediately followed by a call to showInfoWindow()
, like this:
marker.hideInfoWindow();
marker.showInfoWindow();
Answered By - user2334160
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.