Hi I have the above code which animates the camera to a certain location. Is there anyway that I could move the camera position to a different position once it has finished the animation from the first location ? I am trying an if statement but it doesn't work.
for instance:
CameraPosition cameraPosition = new CameraPosition.Builder() .target(1stlocation) .zoom(12) .bearing(300) .tilt(30) .build(); map.addMarker(new MarkerOptions() .icon(BitmapDescriptorFactory.fromResource(R.drawable.green)) .position(1st Location) .flat(true) .rotation(245)); map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition ), 30000, null);
//if statement to change the position of the camera when it reaches the first location then move it to another.
CameraPosition campos = map.getCameraPosition(); if(campos == cameraPosition ) { map.moveCamera(CameraUpdateFactory.newLatLngZoom(2ndloc, 3)); }