Reputation: 79
We have to show the marker InfoWindow and increase the size of the marker to show the focus of the highlighted location programmatically. How can we achieve this in flutter google maps? Example image
Upvotes: 1
Views: 2837
Reputation: 755
If you need to open it outside the onMapCreated method after creating the map, you can still call the controller as below. Noted that _controller needs to be initialized.
final GoogleMapController mapcontroller = await _controller.future;
mapcontroller.showMarkerInfoWindow(MarkerId(MARKER_ID));
Upvotes: 0
Reputation: 3167
To select a marker do:
maker.onTap();
To show marker InfoWindow, do:
googleMapController
.animateCamera(CameraUpdate.newLatLngBounds(bounds, 45.0))
.then((_) async {
await Future.delayed(Duration(seconds: 1));
googleMapController.showMarkerInfoWindow(markerId);
});
Upvotes: 0
Reputation: 2030
You can use GoogleMapController to show the info window.
googleMapController.showMarkerInfoWindow(markerId);
Upvotes: 2
Reputation: 413
Hi its not possible at the moment but there are issues made for it: https://github.com/flutter/flutter/issues/29899 and https://github.com/flutter/flutter/issues/33481.
Upvotes: 0