Defines camera movement parameters. For details about how to create a CameraUpdate object, see functions such as newCameraPosition, newLatLng, and newLatLngBounds. For details about how to obtain the map controller class mapController, see MapComponentController.
Model restriction: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since version 4.1.0(11).
System capability: SystemCapability.Map.Core
Since: 4.1.0(11)
Example:
let target: mapCommon.LatLng = {
latitude: 39.9,
longitude: 116.4
};
let cameraPosition: mapCommon.CameraPosition = {
target: target,
zoom: 10
};
// Create a CameraUpdate object.
let cameraUpdate: map.CameraUpdate = map.newCameraPosition(cameraPosition);
// Move the camera.
this.mapController.moveCamera(cameraUpdate);