#894 - Closing InfoWindows when the map moves as alerted to via MapChange events
This commit is contained in:
committed by
Justin R. Miller
parent
d256087f04
commit
1a21a0951a
@@ -1894,5 +1894,18 @@ public class MapView extends FrameLayout implements LocationListener {
|
||||
mGpsMarker.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
if (change.equals(MapChange.MapChangeRegionWillChange) || change.equals(MapChange.MapChangeRegionWillChangeAnimated)) {
|
||||
// Close any open InfoWindows
|
||||
for (Annotation annotation : mAnnotations) {
|
||||
if (annotation instanceof Marker) {
|
||||
Marker marker = (Marker) annotation;
|
||||
if (marker.isInfoWindowShown()) {
|
||||
marker.hideInfoWindow();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user