당신은 GoogleMap.OnCameraMoveStartedListener, GoogleMap.OnCameraMoveListener, GoogleMap.OnCameraMoveCanceledListener, GoogleMap.OnCameraIdleListener를 재정 의하여 현재 중간 카메라 위치를 얻을 수 있습니다.
@Override
public void onCameraIdle() {
double nextlatitude = mGoogleMap.getProjection().getVisibleRegion().latLngBounds.getCenter().latitude;
double nextlongitude = mGoogleMap.getProjection().getVisibleRegion().latLngBounds.getCenter().longitude;
System.out.println("Location Next : "+nextlatitude+" "+nextlongitude);
}
@Override
public void onCameraMoveCanceled() {
// Toast.makeText(getActivity(), "Camera movement canceled.",
// Toast.LENGTH_SHORT).show();
}
@Override
public void onCameraMove() {
}
@Override
public void onCameraMoveStarted(int reason) {
// if (reason == GoogleMap.OnCameraMoveStartedListener.REASON_GESTURE) {
// Toast.makeText(getActivity(), "The user gestured on the map.",
// Toast.LENGTH_SHORT).show();
// } else if (reason == GoogleMap.OnCameraMoveStartedListener
// .REASON_API_ANIMATION) {
// Toast.makeText(getActivity(), "The user tapped something on the map.",
// Toast.LENGTH_SHORT).show();
// } else if (reason == GoogleMap.OnCameraMoveStartedListener
// .REASON_DEVELOPER_ANIMATION) {
// Toast.makeText(getActivity(), "The app moved the camera.",
// Toast.LENGTH_SHORT).show();
// }
}
및이에 의해 현재의 줌 레벨을 얻을 수 있습니다 :
map.getCameraPosition().zoom