如何在此处地图中实现当前位置的蓝色图标 [英] How to implement current location blue icon in Here Map

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

问题描述

我正在使用此处Map SDK ,我需要显示一个带有圆圈动画的蓝色图标,用于显示当前位置(如图片中所示).

I am working with the Here Map SDK and I need to show a blue icon with circle animation for current location like in image.

谁能告诉我该怎么做.

现在我有代码设置仅图标为蓝点的代码.我不知道如何向其中添加圆形动画.

Right now I have code which sets the icon only which is blue dot. I don't know how to add circle animation to it.

请注意,mMap参考是

推荐答案

尝试以下方法:

mMap.setMyLocationEnabled(true);

它启用或禁用my-location层. 在启用并且位置可用时,我的位置"图层会连续绘制用户当前位置和方位的指示,并显示允许用户与其位置进行交互的UI控件(例如,启用或禁用相机对其位置的跟踪)位置和方位).

It enables or disables the my-location layer. While enabled and the location is available, the my-location layer continuously draws an indication of a user's current location and bearing, and displays UI controls that allow a user to interact with their location (for example, to enable or disable camera tracking of their location and bearing).

如果将其放在以下位置会更好:

Much better if you place it under:

@Override
public void onMapReady(GoogleMap googleMap) {

}

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

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