如何在Google地图中隐藏当前位置? [英] How to hide current location in google map?

查看:161
本文介绍了如何在Google地图中隐藏当前位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在项目中实现了google map,我想隐藏我的当前位置标记,并且需要显示允许转到当前位置的按钮.

I have implemented google map in my project and i want to hide my current location marker and i need to show the button which allow to go my current location.

由于google提供了当前位置按钮,但我想隐藏当前位置标记.我附上图片会更好地帮助您理解问题.

As the google provides current location button but i want to hide current location marker. I am attaching image the will more helps you in understanding the problem.

推荐答案

您可以通过Google Map实例(此处称为地图")禁用它

You can disable it from with your Google Map instance (here called "map")

map.setMyLocationEnabled(false);
map.getUiSettings().setMyLocationButtonEnabled(false);

这篇关于如何在Google地图中隐藏当前位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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