如何隐藏];导航"和" GPS指针"按钮,当我点击了Android谷歌地图上的标记 [英] How to hide "Navigation" and "GPS Pointer" buttons when I click the marker on the android google map

查看:285
本文介绍了如何隐藏];导航"和" GPS指针"按钮,当我点击了Android谷歌地图上的标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我点击谷歌地图上的标记,导航和全球定位系统指针按钮来我out.How可以隐藏这些两个按钮编程在Android开发?

When I click the marker on the google map, "Navigation" and "GPS Pointer" buttons come out.How can I hide those two buttons programatically in android development?

推荐答案

有关你已经用红色标出的工具栏,可以使用禁用的<一个href="http://developer.android.com/reference/com/google/android/gms/maps/UiSettings.html#setMapToolbarEnabled(boolean)">setMapToolbarEnabled()法UISettings 。

For the toolbar you have outlined in red, you can disable it using the setMapToolbarEnabled() method in UISettings.

从文档:

设定了preference的地图工具条是否启用或   禁用。如果启用,用户将看到一个酒吧,各种   上下文相关的行动,其中包括打开此图中的谷歌地图   应用程序和寻找方向的突出标志,在谷歌地图   应用程序。

Sets the preference for whether the Map Toolbar should be enabled or disabled. If enabled, 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'.

code为例,禁用两个按钮:

Code example to disable the two buttons:

//Disable Map Toolbar:
mMap.getUiSettings().setMapToolbarEnabled(false);

以防万一,你也想知道变焦按钮,您可以禁用它们是这样的:

Just in case you were also wondering about the zoom buttons, you can disable them like this:

mMap.getUiSettings().setZoomControlsEnabled(false);

这篇关于如何隐藏];导航&QUOT;和&QUOT; GPS指针&QUOT;按钮,当我点击了Android谷歌地图上的标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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