Reputation: 703
I am using Android GoogleMap class (Google Play Services 8.1.0) and want to track map position change, that can be made by pan or zoom inside screen.
With the event, I need to update the places, according to map center.
In the previous APIs it was possible, but now I didnt find a way to do it.
Upvotes: 1
Views: 1417
Reputation: 226
Use one of the methods that listens to the camera move (e.g. setOnCameraMoveStartedListener, setOnCameraMoveCancelledListener etc) and check the reason:
googleMap.setOnCameraMoveStartedListener(new GoogleMap.OnCameraMoveStartedListener() {
@Override
public void onCameraMoveStarted(int reason) {
if (reason == GoogleMap.OnCameraMoveStartedListener.REASON_GESTURE) {
//map is touched..do something
}
}
});
Upvotes: 5