当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


JavaScript ArcGIS Viewpoint.rotation用法及代码示例


基本信息

以下是所在类或对象的基本信息。

AMD: require(["esri/Viewpoint"], (Viewpoint) => { /* code goes here */ });

ESM: import Viewpoint from "@arcgis/core/Viewpoint";

类: esri/Viewpoint

继承: Viewpoint > Accessor

自从:用于 JavaScript 4.0 的 ArcGIS API

用法说明

Viewpoint.rotation函数(或属性)的定义如下:

rotation Number


正北相对于视图顶部的旋转度数。

默认值:0

例子:

// due north is rotated 90 degrees, pointing to the right side of the view
viewpoint.rotation = 90;
// due north is rotated 180 degrees, pointing to the bottom of the view
viewpoint.rotation = 180;
// due north is rotated 270 degrees, pointing to the left side of the view
viewpoint.rotation = 270;
// due north is rotated 0 degrees, pointing to the top of the view (the default)
viewpoint.rotation = 0; // 360 or multiple of 360 (e.g. 720) works here as well.

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 Viewpoint.rotation。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。