com.neomades.maps.camera.MapCamera |
Represents the camera looking at the map.
An object of this type can be used to modify a map's camera by calling animate(MapCameraUpdate), animate(MapCameraUpdate, int) or move(MapCameraUpdate).
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
animate(MapCameraUpdate update)
Animates the movement of the camera from the current position to the position
defined in the update and calls an optional callback on completion.
| ||||||||||
abstract void |
animate(MapCameraUpdate update, int durationMs)
Animates the movement of the camera from the current position to the position
defined in the update and calls an optional callback on completion.
| ||||||||||
abstract Location |
getCenterLocation()
Returns the location that the camera is pointing at.
| ||||||||||
abstract float |
getMaxZoomLevel()
Returns the maximum zoom level.
| ||||||||||
abstract float |
getMinZoomLevel()
Returns the minimum zoom level.
| ||||||||||
abstract float |
getZoomLevel()
Returns the current zoom level for the current camera position.
| ||||||||||
abstract void |
move(MapCameraUpdate update)
Repositions the camera according to the instructions defined in the update.
| ||||||||||
abstract void |
setCameraChangeListener(MapCameraChangeListener listener)
Sets a callback that is invoked when the camera changes.
| ||||||||||
abstract void |
stopAnimation()
Stops the camera animation if there is one in progress.
| ||||||||||
abstract void |
takeSnapshot(MapSnapshotListener callback)
Takes a snapshot of the map.
|
Animates the movement of the camera from the current position to the position defined in the update and calls an optional callback on completion.
During the animation, a call to getCenterLocation() returns an intermediate location of the camera.
update | The change that should be applied to the camera. |
---|
Animates the movement of the camera from the current position to the position defined in the update and calls an optional callback on completion.
During the animation, a call to getCenterLocation() returns an intermediate location of the camera.
update | The change that should be applied to the camera. |
---|---|
durationMs | The duration of the animation in milliseconds. This must be strictly positive, otherwise an IllegalArgumentException will be thrown. |
Returns the location that the camera is pointing at.
Returns the maximum zoom level.
Returns the minimum zoom level.
Returns the current zoom level for the current camera position.
Repositions the camera according to the instructions defined in the update.
The move is instantaneous, and a subsequent getCenterLocation() will reflect the new position.
update | The change that should be applied to the camera. |
---|
Sets a callback that is invoked when the camera changes.
listener | The callback that is invoked when the camera changes. To unset the
callback, use null .
|
---|
Stops the camera animation if there is one in progress. When the method is called, the camera stops moving immediately and remains in that position.
Supported only on the Android
platform.
Takes a snapshot of the map.
You can use snapshots within your application when an interactive map would be difficult, or impossible, to use. For example, images produced with the takeSnapshot() method can be used to display a thumbnail of the map in your app, or a snapshot in the notification center.
Note: Images of the map must not be transmitted to your servers, or otherwise used outside of the application. If you need to send a map to another application or user, send data that allows them to reconstruct the map for the new user instead of a snapshot.
callback | Callback method invoked when the snapshot is taken. |
---|