I know this might be a little silly and I must have missed something but how do I disable that animation that zooms in all the way to my marker and load up google maps and my current location immediately?
This is my current code
@Override
public void onLocationChanged(Location location) {
currentLocation = location;
String curr_location = currentLocation.getLatitude()+ ","+currentLocation.getLongitude();
LatLng coordinates = new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());
CameraUpdate current = CameraUpdateFactory.newLatLngZoom(coordinates,15);
googleMap.animateCamera(current);
UpdateLocation(userid,email,curr_location);
}
I'd like to remove the animate camera if possible. thanks!
Quick tip: In the iPhone and Android apps, tapping the Current Location button twice will turn on compass mode. The app will center on your location, but the map will rotate to match the direction you're currently facing in real life.
Disabling the UI Default Controls We can disable the default UI controls provided by Google Maps simply by making the disableDefaultUI value true in the map options.
Without clicking any button, how to directly get the current location and move the camera to it. Also, I found that there is a button on the right top of the map. When click on it, it will go to current location.
Replace
googleMap.animateCamera(current);
with
googleMap.moveCamera(current);
(Reference)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With