Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Google Maps remove navigation button at bottomRight on marker tap

Is it possible to remove the google maps navigation button at bottom right when we click on a marker?

enter image description here

I tried this

        Marker(
              consumeTapEvents: true,
              onTap: () {
                print("marker clicked");
              },
              infoWindow: InfoWindow(
                  title: "title",
                  snippet: "snippet",
                  onTap: () {
                    markerTap();
                  }),
                 )

It worked but I ran into a new issue that it doesn't open info window on marker on click. Any suggestion?

like image 971
Shahzad Akram Avatar asked Jul 24 '19 10:07

Shahzad Akram


People also ask

How do I remove a button from Google Maps?

Disabling the Default UI To do so, set the map's disableDefaultUI property (within the MapOptions object) to true . This property disables any UI control buttons from the Maps JavaScript API.

How do I get rid of the zoom button on Google map flutter?

If anyone want to remove zoom control. Add zoomControlsEnabled: false to google map view.

How do I remove a marker from Google Maps flutter?

To clear the entire markers, you can use the _controller. clearMarkers() method. This will remove entire marker collections from maps.

How do you remove map markers on Google Maps?

Find the “Layers” menu in the bottom left corner of the screen. Hover your cursor over the box and wait until more options appear. Click “More” to open the Map Details menu. Under “Map Type,” you'll see a checked box next to “Labels.” Uncheck it to remove all labels.


1 Answers

With google_maps_flutter version 0.5.20 they added support to enable/disable this.

In your GoogleMap widget add:

mapToolbarEnabled: false
like image 166
nyorn Avatar answered Sep 20 '22 17:09

nyorn