Search in sources :

Example 1 with CameraPosition

use of com.google.android.gms.maps.model.CameraPosition in project cw-omnibus by commonsguy.

the class MainActivity method onCameraMove.

@Override
public void onCameraMove() {
    CameraPosition position = map.getCameraPosition();
    Log.d("onCameraMove", String.format("lat: %f, lon: %f, zoom: %f, tilt: %f", position.target.latitude, position.target.longitude, position.zoom, position.tilt));
}
Also used : CameraPosition(com.google.android.gms.maps.model.CameraPosition)

Example 2 with CameraPosition

use of com.google.android.gms.maps.model.CameraPosition in project cw-omnibus by commonsguy.

the class MainActivity method onCameraMoveStarted.

@Override
public void onCameraMoveStarted(int i) {
    CameraPosition position = map.getCameraPosition();
    Log.d("onCameraMoveStarted", String.format("lat: %f, lon: %f, zoom: %f, tilt: %f", position.target.latitude, position.target.longitude, position.zoom, position.tilt));
}
Also used : CameraPosition(com.google.android.gms.maps.model.CameraPosition)

Example 3 with CameraPosition

use of com.google.android.gms.maps.model.CameraPosition in project cw-omnibus by commonsguy.

the class MainActivity method onCameraIdle.

@Override
public void onCameraIdle() {
    CameraPosition position = map.getCameraPosition();
    Log.d("onCameraIdle", String.format("lat: %f, lon: %f, zoom: %f, tilt: %f", position.target.latitude, position.target.longitude, position.zoom, position.tilt));
}
Also used : CameraPosition(com.google.android.gms.maps.model.CameraPosition)

Example 4 with CameraPosition

use of com.google.android.gms.maps.model.CameraPosition in project android-maps-utils by googlemaps.

the class ClusterManager method onCameraIdle.

/**
     * Might re-cluster.
     */
@Override
public void onCameraIdle() {
    if (mRenderer instanceof GoogleMap.OnCameraIdleListener) {
        ((GoogleMap.OnCameraIdleListener) mRenderer).onCameraIdle();
    }
    // Don't re-compute clusters if the map has just been panned/tilted/rotated.
    CameraPosition position = mMap.getCameraPosition();
    if (mPreviousCameraPosition != null && mPreviousCameraPosition.zoom == position.zoom) {
        return;
    }
    mPreviousCameraPosition = mMap.getCameraPosition();
    cluster();
}
Also used : CameraPosition(com.google.android.gms.maps.model.CameraPosition)

Example 5 with CameraPosition

use of com.google.android.gms.maps.model.CameraPosition in project cw-omnibus by commonsguy.

the class MainActivity method onCameraMoveCanceled.

@Override
public void onCameraMoveCanceled() {
    CameraPosition position = map.getCameraPosition();
    Log.d("onCameraMoveCanceled", String.format("lat: %f, lon: %f, zoom: %f, tilt: %f", position.target.latitude, position.target.longitude, position.zoom, position.tilt));
}
Also used : CameraPosition(com.google.android.gms.maps.model.CameraPosition)

Aggregations

CameraPosition (com.google.android.gms.maps.model.CameraPosition)8 LatLng (com.google.android.gms.maps.model.LatLng)2 MarkerOptions (com.google.android.gms.maps.model.MarkerOptions)2 Handler (android.os.Handler)1 CircleOptions (com.google.android.gms.maps.model.CircleOptions)1 PolylineOptions (com.google.android.gms.maps.model.PolylineOptions)1 DocumentBuilder (javax.xml.parsers.DocumentBuilder)1