# CameraOptions
常见的选项地图#jumpTo,地图#easeTo和地图#一个FlyTo,控制摄像机的所需位置,缩放,轴承,和俯仰。所有属性都是可选的,当省略某个属性时,该属性的当前相机值将保持不变。
类型: Object
# Properties
center**[LngLatLike][284]**所需的中心。zoomnumber所需的缩放级别。bearing**number**以度为单位的所需方位。方位是“向上”的罗盘方向。例如,bearing: 90调整地图的方向,使东方朝上。pitch**number**所需的度数。俯仰角是与地平线的角度,以度为单位,范围在 0 到 60 度之间。例如,pitch: 0 提供了直视地图的外观,而 pitch: 60 使用户的视角向地平线倾斜。增加间距值通常用于显示 3D 对象。around**[LngLatLike][284]**如果zoom指定,则around确定缩放的中心点。padding**[PaddingOptions][196]**应用在视口每一侧以移动消失点的尺寸(以像素为单位)。
# Examples
// set the map's initial perspective with CameraOptions
var map = new vjmap.Map({
container: 'map',
style: 'your style',
center: [-73.5804, 45.53483],
pitch: 60,
bearing: -60,
zoom: 10
});
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9