public final class CameraUpdateFactory
extends java.lang.Object
CameraUpdateFactory used to modify map camera.
Copyright (c) 2017 Nexusgeographics All rights reserved.
| Modifier and Type | Method and Description | 
|---|---|
static CameraUpdate | 
newCameraPosition(CameraPosition cameraposition)
Returns a CameraUpdate that moves the camera to a specified CameraPosition. 
 | 
static CameraUpdate | 
newLatLng(LatLng latLng)
Returns a CameraUpdate that moves the center of the screen to a latitude and longitude specified by a LatLng object. 
 | 
static CameraUpdate | 
newLatLngBounds(LatLngBounds bounds,
               int padding)
Returns a CameraUpdate that moves screen to a bounds specified by a LatLngBounds object. 
 | 
static CameraUpdate | 
newLatLngZoom(LatLng latLng,
             float zoom)
Returns a CameraUpdate that moves the center of the screen to a latitude and longitude specified by a LatLng object, and moves to the given zoom level. 
 | 
static CameraUpdate | 
rotation(float rotation)
Returns a CameraUpdate that rotate map. 
 | 
static CameraUpdate | 
zoomIn()
Returns a CameraUpdate that zoom in on the map increments in 1.0. 
 | 
static CameraUpdate | 
zoomOut()
Returns a CameraUpdate that zoom in on the map decrement in 1.0. 
 | 
static CameraUpdate | 
zoomTo(float zoom)
Returns a CameraUpdate that moves the camera viewpoint to a particular zoom level. 
 | 
public static CameraUpdate newCameraPosition(@NonNull CameraPosition cameraposition)
Returns a CameraUpdate that moves the camera to a specified CameraPosition. In effect, this creates a transformation from the CameraPosition object's latitude, longitude, zoom level, bearing and tilt.
     MapController map = ...;
     CameraPosition cameraPosition = ...;
     map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
 cameraposition - the camera positionpublic static CameraUpdate newLatLng(@NonNull LatLng latLng)
Returns a CameraUpdate that moves the center of the screen to a latitude and longitude specified by a LatLng object. This centers the camera on the LatLng.
     MapController map = ...;
     LatLng latLng = ...;
     map.animateCamera(CameraUpdateFactory.newLatLng(latLng));
 latLng - the lng latpublic static CameraUpdate newLatLngZoom(@NonNull LatLng latLng, float zoom)
Returns a CameraUpdate that moves the center of the screen to a latitude and longitude specified by a LatLng object, and moves to the given zoom level.
     MapController map = ...;
     LatLng latLng = ...;
     float zoom = 8;
     map.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, zoom));
 latLng - the lng latzoom - the zoompublic static CameraUpdate newLatLngBounds(@NonNull LatLngBounds bounds, int padding)
Returns a CameraUpdate that moves screen to a bounds specified by a LatLngBounds object.
     MapController map = ...;
     LatLngBounds bounds = ...;
     map.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds));
 bounds - the boundspadding - public static CameraUpdate zoomTo(float zoom)
Returns a CameraUpdate that moves the camera viewpoint to a particular zoom level.
     MapController map = ...;
     float zoom = 8;
     map.animateCamera(CameraUpdateFactory.zoomTo(zoom));
 zoom - the zoompublic static CameraUpdate zoomIn()
Returns a CameraUpdate that zoom in on the map increments in 1.0.
     MapController map = ...;
     map.animateCamera(CameraUpdateFactory.zoomIn());
 public static CameraUpdate zoomOut()
Returns a CameraUpdate that zoom in on the map decrement in 1.0.
     MapController map = ...;
     map.animateCamera(CameraUpdateFactory.zoomOut());
 public static CameraUpdate rotation(float rotation)
     MapController map = ...;
     float rotation = 0.5;
     map.animateCamera(CameraUpdateFactory.rotation(rotation));
 rotation - rotation in radians; 0 corresponds to North pointing up