Flutter Google Maps remove navigation button at bottomRight on marker tap

怎甘沉沦 提交于 2020-04-13 17:01:31

问题


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

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?


回答1:


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

In your GoogleMap widget add:

mapToolbarEnabled: false


来源:https://stackoverflow.com/questions/57180339/flutter-google-maps-remove-navigation-button-at-bottomright-on-marker-tap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!