一組環。每個環是一個二維數字數組,表示視圖空間參考中環中每個頂點的坐標。每個環的第一個頂點應始終與最後一個頂點相同。每個頂點是一個由兩個、三個或四個數字組成的數組。下表顯示了頂點數組的各種結構。
案子 頂點數組 沒有 z 和沒有 m [x, y] 不帶 z 且帶 m [x, y, 米] 有 z 且無 m [x, y, z] 與 z 和與 m [x, y, z, 米] 例子:
//3D polygon rings with m-values (note that the second ring does not have m-values defined for it) const rings = [ [ // first ring [-97.06138,32.837,35.1,4.8], [-97.06133,32.836,35.2,4.1], [-97.06124,32.834,35.3,4.2], [-97.06138,32.837,35.1,4.8] // same as first vertex ], [ // second ring [-97.06326,32.759,35.4], [-97.06298,32.755,35.5], [-97.06153,32.749,35.6], [-97.06326,32.759,35.4] // same as first vertex ] ]; const polygon = new Polygon({ hasZ: true, hasM: true, rings: rings, spatialReference: { wkid: 4326 } });
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/geometry/Polygon"], (Polygon) => { /* code goes here */ });
ESM:
import Polygon from "@arcgis/core/geometry/Polygon";
類:
esri/geometry/Polygon
繼承: Polygon > Geometry > Accessor
子類: Circle
自從:用於 JavaScript 4.0 的 ArcGIS API
用法說明
Polygon.rings
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS Polygon.fromExtent用法及代碼示例
- JavaScript ArcGIS PolygonDrawAction draw-complete事件用法及代碼示例
- JavaScript ArcGIS PolygonDrawAction.mode用法及代碼示例
- JavaScript ArcGIS PolygonDrawAction vertex-add事件用法及代碼示例
- JavaScript ArcGIS PolygonDrawAction vertex-remove事件用法及代碼示例
- JavaScript ArcGIS PolygonDrawAction cursor-update事件用法及代碼示例
- JavaScript ArcGIS PolygonDrawAction用法及代碼示例
- JavaScript ArcGIS PolygonDrawAction.undo用法及代碼示例
- JavaScript ArcGIS PolygonSymbol3D.clone用法及代碼示例
- JavaScript ArcGIS PolygonSymbol3D用法及代碼示例
- JavaScript ArcGIS PolygonDrawAction.on用法及代碼示例
- JavaScript ArcGIS PolygonDrawAction.redo用法及代碼示例
- JavaScript ArcGIS PolygonDrawAction redo事件用法及代碼示例
- JavaScript ArcGIS PolygonDrawAction undo事件用法及代碼示例
- JavaScript ArcGIS PolylineDrawAction redo事件用法及代碼示例
- JavaScript ArcGIS PolylineBarrier用法及代碼示例
- JavaScript ArcGIS PolylineDrawAction undo事件用法及代碼示例
- JavaScript ArcGIS PolylineDrawAction.on用法及代碼示例
- JavaScript ArcGIS PolylineDrawAction.mode用法及代碼示例
- JavaScript ArcGIS PolylineDrawAction cursor-update事件用法及代碼示例
- JavaScript ArcGIS PolylineDrawAction vertex-remove事件用法及代碼示例
- JavaScript ArcGIS PolylineDrawAction.undo用法及代碼示例
- JavaScript ArcGIS PolylineDrawAction vertex-add事件用法及代碼示例
- JavaScript ArcGIS Polyline.paths用法及代碼示例
- JavaScript ArcGIS PolylineDrawAction用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 Polygon.rings。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。