use of com.google.android.libraries.maps.GoogleMap.OnCameraIdleListener in project android-samples by googlemaps.
the class VisibleRegionDemoActivity method onMapReady.
@Override
public void onMapReady(GoogleMap map) {
mMap = map;
// Move to a place with indoor (SFO airport).
mMap.setPadding(currentLeft, currentTop, currentRight, currentBottom);
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(SFO, 18));
// Add a marker to the Opera House.
mMap.addMarker(new MarkerOptions().position(SOH).title("Sydney Opera House"));
// Add a camera idle listener.
mMap.setOnCameraIdleListener(new OnCameraIdleListener() {
@Override
public void onCameraIdle() {
mMessageView.setText("CameraChangeListener: " + mMap.getCameraPosition());
}
});
}
Aggregations