-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