2

I am using Google Maps SDK for Android v2. I create a new "cameraPosition" and then I call "animateCamera" method in my map to move the map to the GPS location of the user:

 CameraPosition cameraPosition = new CameraPosition.Builder()
                .target(location_latlon)      
                .zoom(17)              
                .bearing(90)             
                .tilt(30)                 
                .build();      

map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));

The code works perfectly when I open the app the first time, but when I open the app the second time the "animateCamera" method goes to the coordinates (0.0, 0.0). If I stop the app and launch it again it works again only the first time.

I have debugged and the "cameraPosition" method returns a valid position with real coordinates but when I call the method "animateCamera" it simply doesn´t do anything. It just goest to latitude 0.0 and longitude 0.0

Thanks.

cues7a
  • 219
  • 1
  • 7

0 Answers0