简体   繁体   English

谷歌地图 - 如何删除地图工具栏

[英]Google Maps - How to remove Map Toolbar

How can I remove those buttons?我怎样才能删除这些按钮?

在此处输入图片说明

You can get the UiSettings from your GoogleMap and then set these items to false.您可以从GoogleMap获取UiSettings ,然后将这些项目设置为 false。

The button that you want to remove is the Map Toolbar您要删除的按钮是Map Toolbar

Sets the preference for whether the Map Toolbar should be enabled or disabled.设置是启用还是禁用地图工具栏的首选项。 If enabled, and the Map Toolbar can be shown in the current context, users will see a bar with various context-dependent actions, including 'open this map in the Google Maps app' and 'find directions to the highlighted marker in the Google Maps app'.如果启用,并且地图工具栏可以在当前上下文中显示,用户将看到一个带有各种上下文相关操作的栏,包括“在 Google 地图应用程序中打开此地图”和“在 Google 地图中查找到突出显示标记的路线”应用程序'。

So you should remove it using setMapToolbarEnabled所以你应该使用setMapToolbarEnabled删除它

Example :例子 :

mMap.getUiSettings().setMapToolbarEnabled(false);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM