如何删除默认的小型谷歌地图标记,同时建立导航应用 [英] How to remove default small-sized Google Map marker while building navigation app

查看:138
本文介绍了如何删除默认的小型谷歌地图标记,同时建立导航应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是低于code吸取谷歌地图标记中的Andr​​oid导航应用程序。

I am using the below code to draw a marker on Google Maps in a android navigation app.

Marker marker = mMap.addMarker(
  new MarkerOptions().position(current)
                     .anchor(0.5f, 0.3f)
                     .icon(BitmapDescriptorFactory.fromResource(
                             R.drawable.navigation_marker)));

此标记出现成功,但默认小型标记不会被删除。所以,最终我都在同一时间两个标记。能否请您就如何删除默认的标记帮助?

This marker appears successfully, but the default small-sized marker does not get removed. So, eventually I have two markers at the same time. Can you please help on how to remove the default marker?

推荐答案

假设你的意思是蓝点或我的位置,你将有使用完全地消除GoogleMap.setMyLocationEnabled 和使用自己的 LocationClient 更新用户的当前位置。

Assuming you mean "the blue dot" or "my location", you will have to completly remove it using GoogleMap.setMyLocationEnabled and use your own LocationClient to update user's current position.

这篇关于如何删除默认的小型谷歌地图标记,同时建立导航应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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