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

centerOn

@DeprecatedSince(2020, 1) abstract fun centerOn(@NonNull location: LatLng): Unit
Deprecated: Deprecated in Java

Center map on given coordinates/

Parameters

location - LatLng: Coordinates to center map on.

@DeprecatedSince(2020, 1) abstract fun centerOn(@NonNull location: LatLng, zoomLevel: Double): Unit
Deprecated: Deprecated in Java

Center map on given coordinates and with given zoom level. When zoom level is out of range, the minimum zoom level will be set. Zoom levels are in range [0, 20]

Parameters

location - LatLng: Coordinates to center map on.

zoomLevel - Double: Map zoom level

@DeprecatedSince(2020, 1) abstract fun centerOn(latitude: Double, longitude: Double): Unit
Deprecated: Deprecated in Java

Center map on given latitude and longitude. Latitude and longitude is set in degrees minutes seconds format.

Parameters

latitude - Double: Latitude to center map on.

longitude - Double: Longitude to center map on.

@DeprecatedSince(2020, 1) abstract fun centerOn(latitude: Double, longitude: Double, zoomLevel: Double): Unit
Deprecated: Deprecated in Java

Center map on given latitude and longitude with a given zoom level. When zoom level is out of range, the minimum zoom level will be set. Zoom levels are in range [0, 20], where 0 is the whole world and 20 is the highest zoom level. Latitude and longitude is set in degrees minutes seconds format.

Parameters

latitude - Double: Latitude to center map on.

longitude - Double: Longitude to center map on.

zoomLevel - Double: Map zoom level

@DeprecatedSince(2020, 1) abstract fun centerOn(latitude: Double, longitude: Double, zoomLevel: Double, yawAngle: Int): Unit
Deprecated: Deprecated in Java

Center map on given latitude and longitude with a given zoom level and yaw angle (map rotation). When zoom level is out of range, the minimum zoom level will be set. Zoom levels are in range [0, 20], where 0 is the whole world and 20 is the highest zoom level. Yaw angle is in range [0, 360], where 0 is north, 90 is east, 180 is south, and 270 is west. Latitude and longitude is set in degrees minutes seconds format.

Parameters

latitude - Double: Latitude to center map on.

longitude - Double: Longitude to center map on.

zoomLevel - Double: Map zoom level

yawAngle - Int: Map rotation

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

Center map on using 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, will be used once they are set.

Parameters

cameraPosition - CameraPosition: Camera position to center map on.

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.

@Beta(2020, 12) 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.

@Beta(2020, 12) 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.

@Beta(2020, 12) 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.