I have a GoogleMap in my Flutter app. When the page loads it calls on API and gets a list of geolocations which I use to create a list of markers.
My GoogleMap uses this list of markers and they display nicely, however, I would like one of them to be active. I can't see anything in the API documentation that says this is possible. How can I achieve this?
Use GoogleMapController to set the marker active, allMarkers here is a list of markers which might be coming from the database and the first one (index 0) will be active after execution of:
_googleMapController.showMarkerInfoWindow(allMarkers[0].markerId);
Documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With