showMarkerInfoWindow method
Programmatically show the Info Window for a Marker.
The markerId
must match one of the markers on the map.
An invalid markerId
triggers an "Invalid markerId" error.
- See also:
- hideMarkerInfoWindow to hide the Info Window.
- isMarkerInfoWindowShown to check if the Info Window is showing.
Implementation
Future<void> showMarkerInfoWindow(MarkerId markerId) {
if (Platform.isAndroid) {
return googleController!
.showMarkerInfoWindow(markerId.googleMapsMarkerId);
} else if (Platform.isIOS) {
return appleController!
.showMarkerInfoWindow(markerId.appleMapsAnnoationId);
}
throw ('Platform not supported.');
}