Flutter Google Maps移除底部的导航按钮右击标记 [英] Flutter Google Maps remove navigation button at bottomRight on marker tap

查看:132
本文介绍了Flutter Google Maps移除底部的导航按钮右击标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们单击标记时,是否可以删除右下角的Google地图导航按钮?

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

我尝试过

        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?

推荐答案

在google_maps_flutter版本0.5.20中,他们添加了启用/禁用此功能的支持.

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

在您的GoogleMap小部件中添加:

In your GoogleMap widget add:

mapToolbarEnabled: false

这篇关于Flutter Google Maps移除底部的导航按钮右击标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆