java.lang.Object | |
↳ | com.amazon.geo.mapsv2.CameraUpdateFactory |
Contains methods for creating CameraUpdate
objects. Pass a
CameraUpdate
object to the methods for animating or moving the map
camera:
animateCamera(CameraUpdate)
animateCamera(CameraUpdate, AmazonMap.CancelableCallback)
animateCamera(CameraUpdate, int, AmazonMap.CancelableCallback)
moveCamera(CameraUpdate)
.
Before you can use the methods in this class, the map must be initialized. If
you call these methods before obtaining an AmazonMap
object, you must
initialize the map first by calling
initialize(Context)
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a
CameraUpdate object set to the specified CameraPosition . | |||||||||||
Returns a
CameraUpdate object set to the specified geographic location
(LatLng ). | |||||||||||
Returns a
CameraUpdate object set to the specified
LatLngBounds , padding, width, and height. | |||||||||||
Returns a
CameraUpdate object set to the specified
LatLngBounds and padding. | |||||||||||
Returns a
CameraUpdate object set to the specified LatLng
and specified zoom level. | |||||||||||
Returns a
CameraUpdate object set to shift the camera the
specified number of pixels. | |||||||||||
Returns a
CameraUpdate object set to zoom the camera by a
specified amount over a given focal point. | |||||||||||
Returns a
CameraUpdate object set to zoom the camera by the
specified amount. | |||||||||||
Returns a
CameraUpdate object set to zoom the camera
in one level (+1). | |||||||||||
Returns a
CameraUpdate object set to zoom the camera out
one level (-1). | |||||||||||
Returns a
CameraUpdate object set to zoom the camera to
the specified level. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns a CameraUpdate
object set to the specified CameraPosition
.
A CameraPosition
can include all camera properties (target, bearing, tilt, and zoom).
cameraPosition | A CameraPosition object representing the new camera position. |
---|
CameraUpdate
object.
Returns a CameraUpdate
object set to the specified geographic location
(LatLng
). All other camera properties are unchanged.
latLng | A LatLng object representing the new latitude and longitude. |
---|
CameraUpdate
object.
Returns a CameraUpdate
object set to the specified
LatLngBounds
, padding, width, and height. Using this CameraUpdate
moves the camera such that the specified bounds are visible inside the
screen with the specified padding with the desired width and height (as
close as possible).
Note that this method can be called before the map view has undergone layout.
bounds | A LatLngBounds object representing the region to fit on screen. |
---|---|
width | The desired width of the bounding box in pixels (px). |
height | The desired height of the bounding box in pixels (px). |
padding | Padding in pixels (px) between the bounding box and the edge of the view. A single padding is used for all four sides of the bounding box. |
CameraUpdate
object.
Returns a CameraUpdate
object set to the specified
LatLngBounds
and padding. Using this CameraUpdate
moves the camera such that the specified bounds are visible inside the
screen with the specified padding.
Note that calling this method before the map view has undergone layout
throws an IllegalStateException
.
bounds | A LatLngBounds object representing the region to fit on screen. |
---|---|
padding | The padding in pixels (px) between the bounding box and the edge of the view. A single padding is used for all four sides of the bounding box. |
CameraUpdate
object.
Returns a CameraUpdate
object set to the specified LatLng
and specified zoom level.
When setting the zoom level, smaller numbers move the camera further from the earth. Larger numbers move the camera closer to the earth.
latLng | A LatLng object representing the desired latitude and longitude. |
---|---|
zoom | The desired zoom level. |
CameraUpdate
object.
Returns a CameraUpdate
object set to shift the camera the
specified number of pixels.
xPixel | The number of pixels to shift horizontally. Positive numbers move the camera to the right. Negative numbers move the camera to the left (with respect to the current camera orientation). |
---|---|
yPixel | The number of pixels to shift vertically. Positive numbers move the camera to the down. Negative numbers move the camera to the up (with respect to the current camera orientation). |
CameraUpdate
object.
Returns a CameraUpdate
object set to zoom the camera by a
specified amount over a given focal point.
amount | Amount to change the zoom level. Positive numbers move the camera closer to the earth. Negative numbers move the camera further from the earth. |
---|---|
focus | The pixel around which to zoom. The latitude / longitude at that pixel is the same after this camera change. |
CameraUpdate
object.
Returns a CameraUpdate
object set to zoom the camera by the
specified amount.
amount | Amount to change the zoom level. Positive numbers move the camera closer to the earth. Negative numbers move the camera further from the earth. |
---|
CameraUpdate
object.
Returns a CameraUpdate
object set to zoom the camera
in one level (+1).
CameraUpdate
object.
Returns a CameraUpdate
object set to zoom the camera out
one level (-1).
CameraUpdate
object.
Returns a CameraUpdate
object set to zoom the camera to
the specified level.
When setting the zoom level, smaller numbers move the camera further from the earth. Larger numbers move the camera closer to the earth.
zoom | The desired zoom level, in the range of 2.0 to 21.0. Values outside this range are clamped to the range. |
---|
CameraUpdate
object.