Reputation: 21
I have been working on retrieving GPS locations using Google's FusedLocationProvider API for about a week now. I have successfully gotten close to retrieving accurate gps data.
Currently the marker jumps around the map, instead I want it to smoothly animate like Google Maps, Waze, etc. I have searched the entire internet looking for a solution and have not found anything.
Upvotes: 1
Views: 120
Reputation: 4199
You could use animateCamera() method to set focus to new latlng.
CameraPosition cameraPosition = new CameraPosition.Builder().target(
new LatLng(17.385044, 78.486671)).zoom(12).build();
googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
This will result in smooth transition.
PS:Play with the zoom to make it more realistic.
You are looking for this
Upvotes: 1