Google地图删除标记路线上下文菜单 [英] Google Maps remove marker route context menu

查看:96
本文介绍了Google地图删除标记路线上下文菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Android Studio的Google Maps模板开始了一个新项目,并刚刚在地图上添加了一个标记.

I started a new project with the Google Maps template of Android Studio and just added a marker to the map.

LatLng location = new LatLng(lat, lng);
Marker marker = mMap.addMarker(new MarkerOptions()
            .position(location)
            .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker)));

当我单击标记"时,会出现一个小菜单,右下角带有一个Google Maps图标:

When I click the Marker there comes a little menu with a Google Maps icon on the bottom right corner:

我如何摆脱这件事?我找不到任何东西,甚至不知道如何称呼它,但我真的需要摆脱它.

How can I get rid of this thing? I couldn't find anything I even don't know how to call it but I really need to get rid of it.

推荐答案

您需要致电喜欢这个:

@Override
public void onMapReady(GoogleMap googleMap) {
    googleMap.getUiSettings().setMapToolbarEnabled(false);

    // Do other staff
}

这篇关于Google地图删除标记路线上下文菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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