Dynamic contents in Maps V2 InfoWindow

You should be doing Marker.showInfoWindow() on marker that is currently showing info window when you receive model update.

So you need to do 3 things:

  1. create model and not put all the downloading into InfoWindowAdapter
  2. save reference to Marker (call it markerShowingInfoWindow)
    from getInfoContents(Marker marker)
  3. when model notifies you of download complete call
if (markerShowingInfoWindow != null && markerShowingInfoWindow.isInfoWindowShown()) {
    markerShowingInfoWindow.showInfoWindow();
}

Leave a Comment