-3
我已经实现谷歌地图到我的应用程序。我在当前位置添加了自定义标记。我想随着用户移动标记以及地图一起移动标记。我想实现谷歌地图导航中的功能。虽然谷歌搜索我发现了以下链接,但没有得到结果。所以任何人都可以帮助我?随着用户移动沿着地图移动标记
我在onLocationChanged加入这个()
LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());
sourceLocation = latLng;
startPoint = new GeoPoint(latLng.latitude,latLng.longitude);
forNavigation = location;
// animation
mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
// Zoom in the Google Map
mMap.animateCamera(CameraUpdateFactory.zoomTo(15));
// mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(mPositionMarker.getPosition(), 15));
mMap.animateCamera(CameraUpdateFactory.newLatLng(new LatLng(location
.getLatitude(), location.getLongitude())));
这些是我发现 Google map: moving marker and map together smoothly along with user?
How to smoothly keep moving current location marker in Google Maps v2 android