You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.camera.fitBounds([lng,lat],[lng,lat])this.camera.fitBounds([lng,lat],[lng,lat],20,1000)// padding for all sidesthis.camera.fitBounds([lng,lat],[lng,lat],[verticalPadding,horizontalPadding],1000)this.camera.fitBounds([lng,lat],[lng,lat],[top,right,bottom,left],1000)
Map camera will move to new coordinate at the same zoom level
arguments
Name
Type
Required
Description
coordinates
Array
Yes
Coordinates that map camera will move too
animationDuration
Number
No
Duration of camera animation
this.camera.moveTo([lng,lat],200)// eases camera to new location based on durationthis.camera.moveTo([lng,lat])// snaps camera to new location without any easing
zoomTo(zoomLevel[, animationDuration])
Map camera will zoom to specified level
arguments
Name
Type
Required
Description
zoomLevel
Number
Yes
Zoom level that the map camera will animate too
animationDuration
Number
No
Duration of camera animation
this.camera.zoomTo(16)this.camera.zoomTo(16,100)
setCamera(config)
Map camera will perform updates based on provided config. Advanced use only!