-
rotation
Number
正北相對於視圖頂部的順時針旋轉(以度為單位)。可以通過直接設置旋轉或使用以下鼠標事件來旋轉視圖:
Right-click + Drag
。可以通過將約束中的rotationEnabled
屬性設置為false
來禁用Map旋轉。有關示例,請參閱下麵的代碼片段。默認值:0
例子:
// Due north is rotated 90 degrees, pointing to the right side of the view view.rotation = 90;
// Due north is rotated 180 degrees, pointing to the bottom of the view view.rotation = 180;
// Due north is rotated 270 degrees, pointing to the left side of the view view.rotation = 270;
// Due north is rotated 0 degrees, pointing to the top of the view (the default) view.rotation = 0; // 360 or multiple of 360 (e.g. 720) works here as well.
// Disables map rotation view.constraints = { rotationEnabled: false };
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/views/MapView"], (MapView) => { /* code goes here */ });
ESM:
import MapView from "@arcgis/core/views/MapView";
類:
esri/views/MapView
自從:用於 JavaScript 4.0 的 ArcGIS API
用法說明
MapView.rotation
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS MapView.constraints用法及代碼示例
- JavaScript ArcGIS MapView.takeScreenshot用法及代碼示例
- JavaScript ArcGIS MapView.when用法及代碼示例
- JavaScript ArcGIS MapView.highlightOptions用法及代碼示例
- JavaScript ArcGIS MapView.extent用法及代碼示例
- JavaScript ArcGIS MapView.whenLayerView用法及代碼示例
- JavaScript ArcGIS MapView.scale用法及代碼示例
- JavaScript ArcGIS MapView.toScreen用法及代碼示例
- JavaScript ArcGIS MapView.navigation用法及代碼示例
- JavaScript ArcGIS MapView.animation用法及代碼示例
- JavaScript ArcGIS MapView.widthBreakpoint用法及代碼示例
- JavaScript ArcGIS MapView.input用法及代碼示例
- JavaScript ArcGIS MapView.fatalError用法及代碼示例
- JavaScript ArcGIS MapView.hitTest用法及代碼示例
- JavaScript ArcGIS MapView.destroy用法及代碼示例
- JavaScript ArcGIS MapView.background用法及代碼示例
- JavaScript ArcGIS MapView.spatialReference用法及代碼示例
- JavaScript ArcGIS MapView.breakpoints用法及代碼示例
- JavaScript ArcGIS MapView.tryFatalErrorRecovery用法及代碼示例
- JavaScript ArcGIS MapView.center用法及代碼示例
- JavaScript ArcGIS MapView.on用法及代碼示例
- JavaScript ArcGIS MapView.container用法及代碼示例
- JavaScript ArcGIS MapView.graphics用法及代碼示例
- JavaScript ArcGIS MapView.goTo用法及代碼示例
- JavaScript ArcGIS MapView.popup用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 MapView.rotation。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。