-
heading
Number
以度為單位的相機指南針航向。當北為屏幕頂部時,航向為零。它隨著視圖順時針旋轉而增加。角度始終在 0 到 360 度之間進行歸一化。
默認值:0
例子:
// Initialize the view with a specific camera const cam = new Camera({ heading: 90, // face due east tilt: 45, // looking from a bird's eye view position: [ -122, 38, 20000 ] // creates a point instance (x,y,z) });
// Initialize the view with a specific camera const cam = new Camera({ heading: 90, // face due east tilt: 45, // looking from a bird's eye view position: { latitude: 38, longitude: -122, z: 20000, spatialReference: { wkid: 3857 } } }); view.camera = cam;
// Set the heading of the view's camera to 180 degrees const newCam = view.camera.clone(); newCam.heading = 180; view.camera = newCam;
// go to the pt geometry facing due south view.goTo({ target: pt, heading: 180 });
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/Camera"], (Camera) => { /* code goes here */ });
ESM:
import Camera from "@arcgis/core/Camera";
類:
esri/Camera
繼承: Camera > Accessor
自從:用於 JavaScript 4.0 的 ArcGIS API
用法說明
Camera.heading
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS Camera.tilt用法及代碼示例
- JavaScript ArcGIS Camera.position用法及代碼示例
- JavaScript ArcGIS CIMSymbol.CIMTextSymbol用法及代碼示例
- JavaScript ColorSlider用法及代碼示例
- JavaScript ColorSlider.labelFormatFunction用法及代碼示例
- JavaScript ArcGIS CoordinateConversion.goToOverride用法及代碼示例
- JavaScript ColorSlider.primaryHandleEnabled用法及代碼示例
- JavaScript ClassedSizeSlider.on用法及代碼示例
- JavaScript ArcGIS CSVLayer.getFieldDomain用法及代碼示例
- JavaScript ClassedSizeSlider.fromRendererResult用法及代碼示例
- JavaScript ClassedSizeSlider.histogramConfig用法及代碼示例
- JavaScript ArcGIS Collection用法及代碼示例
- JavaScript ArcGIS CIMSymbol.CIMGeometricEffectJog用法及代碼示例
- JavaScript ArcGIS CoordinateConversion.container用法及代碼示例
- JavaScript ColorSizeSlider thumb-drag事件用法及代碼示例
- JavaScript ArcGIS CustomContent用法及代碼示例
- JavaScript ColorSlider.handlesSyncedToPrimary用法及代碼示例
- JavaScript ArcGIS Collection after-add事件用法及代碼示例
- JavaScript ArcGIS CIMSymbol.CIMMarkerPlacementPolygonCenter用法及代碼示例
- JavaScript ArcGIS CSVLayer refresh事件用法及代碼示例
- JavaScript ArcGIS CSVLayer.effect用法及代碼示例
- JavaScript ArcGIS CSVLayer.when用法及代碼示例
- JavaScript ArcGIS CSVLayer.capabilities用法及代碼示例
- JavaScript ArcGIS Collection.addMany用法及代碼示例
- JavaScript ArcGIS Collection.add用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 Camera.heading。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。