The Mappls Maps SDK camera represents the user’s viewpoint over the map. It provides flexible options to set, update, and animate the camera position, as well as listen for camera movement events and retrieve the current camera state at any time.
The Mappls Maps SDK for Flutter gives you full control over the map camera's position and behavior, enabling you to create highly customized and interactive map experiences. The camera is defined by several key properties:
-
target: The geographic coordinates (latitude and longitude) that the camera focuses on. -
bearing: The map’s rotation, representing the direction the camera is facing. A bearing of 0° points north, while increasing values rotate the map clockwise to indicate a different orientation. -
tilt: The angle between the camera and the ground plane. A tilt of 0° provides a top-down view, while higher values (e.g., 60°) offer a more angled, horizon-facing perspective. -
zoom: Controls how close the camera is to the map content. Lower zoom levels (e.g., 1) show large areas like continents, mid-range values (e.g., 11) show city-level detail, and higher zoom levels reveal streets, buildings, and points of interest.
- Using initial Camera on map:
static final CameraPosition _kInitialPosition = const CameraPosition(
target: LatLng(25.321684, 82.987289),
zoom: 10.0,
);
MapplsMap(
initialCameraPosition: _kInitialPosition,
)- Using
moveCameraoranimateCameraoreaseCamera
const cameraPosition = CameraPosition(
target: LatLng(25.321684, 82.987289),
zoom: 10.0,
);
controller.moveCamera(CameraUpdate.newCameraPosition(cameraPosition));Mappls Map's SDK support three types of Animations:
- Move Camera
- Ease Camera
- Animate Camera
This method immediately updates the map to the specified CameraPosition without applying any transition or animation:
controller.moveCamera(CameraUpdate.newCameraPosition(cameraPosition));This method transitions the map to the provided CameraPosition with a grounded animation, offering a smooth and immersive camera movement experience.
controller.easeCamera(CameraUpdate.newCameraPosition(cameraPosition));This method transitions the map to the specified CameraPosition with a flight animation, simulating a smooth, high-altitude movement for a more dynamic visual experience.
controller.animateCamera(CameraUpdate.newCameraPosition(cameraPosition));Map SDK support : More Controls on Camera Here
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support
Need support? contact us!
