sdk-maps / com.tomtom.online.sdk.map / MapManipulationExtension / centerOn

centerOn

abstract fun centerOn(@NonNull cameraPosition: CameraPosition): Unit

Center a map by using the given camera position options. The required parameters for camera position are latitude and longitude (set in degrees minutes seconds format). Zoom, bearing, and pitch are not mandatory, and will be used once they are set.

Parameters

cameraPosition - CameraPosition: Camera position to center the map.

abstract fun centerOn(@NonNull cameraFocusArea: CameraFocusArea): Unit

Centers a map on the area determined by the BoundingBox defined in the CameraFocusArea. Configurable bearing and pitch are optional.

Parameters

cameraFocusArea - CameraFocusArea: Requested area to center the camera on. This parameter allows the override of the default values for the map bearing and pitch.

abstract fun centerOn(@NonNull cameraFocusArea: CameraFocusArea, animationDuration: AnimationDuration!): Unit

Centers a map on the area determined by the BoundingBox defined in the CameraFocusArea. Configurable bearing and pitch are optional. Map centering can be animated with a set time determined by the given AnimationDuration parameter.

Parameters

cameraFocusArea - CameraFocusArea: Requested area to center the camera on. This parameter allows the override of the default values for the map bearing and pitch.

animationDuration - AnimationDuration!: Duration time of the center-on animation. If zero is used then there is no animation.

abstract fun centerOn(@NonNull cameraPosition: CameraPosition, callback: OnMapCenteredCallback!): Unit

Center the map when using the given camera position options. The required parameters for camera position are latitude and longitude (set in the degrees minutes seconds format). Zoom, bearing, and pitch are not mandatory and will be used once they are set.

Parameters

cameraPosition - CameraPosition: Camera position to center the map on.

callback - OnMapCenteredCallback!: The callback which informs the subscriber when the centering has finished.

abstract fun centerOn(@NonNull cameraFocusArea: CameraFocusArea, callback: OnMapCenteredCallback!): Unit

Centers a map on the area determined by the BoundingBox defined in the CameraFocusArea. Configurable bearing and pitch are optional.

Parameters

cameraFocusArea - CameraFocusArea: Requested area to center the camera on. This parameter allows the override of the default values for the map bearing and pitch.

callback - OnMapCenteredCallback!: The callback which informs the subscriber when the centering has finished.

abstract fun centerOn(@NonNull cameraFocusArea: CameraFocusArea, animationDuration: AnimationDuration!, callback: OnMapCenteredCallback!): Unit

Centers a map on the area determined by the BoundingBox defined in the CameraFocusArea. Configurable bearing and pitch are optional. Map centering can be animated with a set time determined by the given AnimationDuration parameter.

Parameters

cameraFocusArea - CameraFocusArea: Requested area to center the camera on. This parameter allows the override of the default values for the map bearing and pitch.

animationDuration - AnimationDuration!: Duration time of the center-on animation. If zero is used then there is no animation.

callback - OnMapCenteredCallback!: The callback which informs the subscriber when the centering has finished.