標準化與中央子午線相交或落在世界範圍之外的幾何圖形,使其保持在視圖的坐標係內。僅支持 Web Mercator 和 WGS84 空間參考。
參數:
類型 說明 要標準化的幾何數組。
geometryService GeometryService可選的 用於執行規範化的幾何服務。如果此值為
null
,則使用esriConfig.geometryServiceUrl 中的默認幾何服務。requestOptions Object可選的 用於數據請求的附加 options。
返回:
類型 說明 Promise<Geometry[]> 解析為歸一化幾何的數組。 例子:
// create a non-normalized line that crosses the dateline const polyline = new Polyline({ paths: [ [170, 52.68], [190, 49.5] ] }); normalizeUtils.normalizeCentralMeridian([polyline]) .then(function(polylines){ // returns a line representing the same geometry, but // now is normalized between -180 and 180 on the x-coordinate. // but represents the same feature const graphic = new Graphic({ geometry: polylines[0], symbol: { type: "simple-line" } });
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/geometry/support/normalizeUtils"], (normalizeUtils) => { /* code goes here */ });
ESM:
import * as normalizeUtils from "@arcgis/core/geometry/support/normalizeUtils";
對象:
esri/geometry/support/normalizeUtils
自從:用於 JavaScript 4.3 的 ArcGIS API
用法說明
normalizeUtils.normalizeCentralMeridian
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS normalizeUtils.getDenormalizedExtent用法及代碼示例
- JavaScript now()用法及代碼示例
- JavaScript new Legend用法及代碼示例
- JavaScript new SizeSlider用法及代碼示例
- JavaScript ArcGIS new WFSLayer用法及代碼示例
- JavaScript ArcGIS new Daylight用法及代碼示例
- JavaScript new Sketch用法及代碼示例
- JavaScript ArcGIS new FeatureLayer用法及代碼示例
- JavaScript new HeatmapSlider用法及代碼示例
- JavaScript new ColorSizeSlider用法及代碼示例
- JavaScript new ColorSlider用法及代碼示例
- JavaScript new TableList用法及代碼示例
- JavaScript new OpacitySlider用法及代碼示例
- JavaScript new Locate用法及代碼示例
- JavaScript ArcGIS new GeoRSSLayer用法及代碼示例
- JavaScript ArcGIS new FeatureFilter用法及代碼示例
- JavaScript ArcGIS new DirectLineMeasurement3D用法及代碼示例
- JavaScript ArcGIS new WMTSLayer用法及代碼示例
- JavaScript ArcGIS new Editor用法及代碼示例
- JavaScript ArcGIS new WebMap用法及代碼示例
- JavaScript new ScaleBar用法及代碼示例
- JavaScript new Slice用法及代碼示例
- JavaScript ArcGIS new SceneView用法及代碼示例
- JavaScript ArcGIS new GeoJSONLayer用法及代碼示例
- JavaScript new FeatureTable用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 normalizeUtils.normalizeCentralMeridian。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。