Skip to Content
APIMapInterface: MapCamera

Interface: MapCamera

Model of configuration parameters for the change in map camera. Defines the target camera position and orientation for map transitions.

Example

const cameraConfig: MapCamera = { center: { lat: 40.7128, lng: -74.006 }, zoom: 15, bearing: 45, pitch: 30, }

Properties

bearing?

optional bearing: number;

The desired bearing in degrees. The bearing is the compass direction that is “up”. 0 degrees points north, 90 degrees points east, 180 degrees points south, 270 degrees points west.

Example

bearing: 90 // East is up bearing: 180 // South is up bearing: 45 // Northeast is up

center?

optional center: LatLng;

The desired center coordinates for the map view.

See

LatLng for coordinate structure

Example

center: { lat: 40.7128, lng: -74.0060 } // New York

pitch?

optional pitch: number;

The desired pitch in degrees. The pitch is the angle of tilt from the plane of the map. Possible values range from 0 to 85 degrees. 0 degrees is flat (2D view), higher values create a 3D perspective.

Example

pitch: 0 // Flat 2D view pitch: 30 // Slight 3D tilt pitch: 60 // Steep 3D perspective

zoom?

optional zoom: number;

The desired zoom level for the map view. Higher values indicate more zoomed in view.

Example

zoom: 15 // City level zoom: 10 // Country level
Last updated on