Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add navigation button at bottomRight on marker tap Flutter Google Maps on ios

I already have created a flutter android application and works fine. I am using google_maps_flutter plugin to display the map with markers. After when trying to run my app to ios, i encountered a strange problem. It runs as i expected but the bottom right navigation toolbar is not displayed as on android device. I have seen how to disable it only from this question :

Flutter Google Maps remove navigation button at bottomRight on marker tap

Marker(
       markerId: MarkerId('firstMarker'),
       draggable: false,
       icon: BitmapDescriptor.fromBytes(_markerIcon),
       infoWindow: InfoWindow(
          title: f.name,
          snippet: f.time,
          onTap: (){
          displayInfo(f, context);
          }
     ),
     position: LatLng(f.lat, f.lon));

Is this caused from flutter or i must do some changes on my source code?

like image 362
Michail Geek Avatar asked Jan 26 '26 12:01

Michail Geek


1 Answers

For Android you need to add mapToolbarEnabled: true as a property of the GoogleMap widget.

Example:

GoogleMap(
  mapToolbarEnabled: true,
  buildingsEnabled: true,
  mapType: MapType.normal,
  onMapCreated: (controller) {
    _initMap(controller);
  },
);
like image 157
sean.boyer Avatar answered Jan 29 '26 12:01

sean.boyer