我正在使用Here Map SDK,我需要显示一个带有圆形动画的蓝色图标,用于当前位置,如图像.
任何人都可以告诉我该怎么做.
现在我的代码只设置了蓝点的图标.我不知道如何添加圆圈动画.
请注意,mMap引用是Here Android SDK中的Map对象.
mMap.getPositionIndicator().setVisible(true);
mMap.getPositionIndicator().setZIndex(0);
mMap.setZoomLevel(15);
mMap.getPositionIndicator().setAccuracyIndicatorVisible(true);
mMap.getPositionIndicator().setMarker(createImage(R.drawable.ic_location_dot));
Run Code Online (Sandbox Code Playgroud)
对于 JavaScript 你可以使用
map.addObject(new H.map.Circle(
// The central point of the circle
{lat:28.6071, lng:77.2127},
// The radius of the circle in meters
1000,
{
style: {
strokeColor: 'rgba(55, 85, 170, 0.6)', // Color of the perimeter
lineWidth: 2,
fillColor: 'rgba(0, 128, 0, 0.1)' // Color of the circle
}
}
));
Run Code Online (Sandbox Code Playgroud)
android 应该有类似的实现。
| 归档时间: |
|
| 查看次数: |
5626 次 |
| 最近记录: |