當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


JavaScript ArcGIS GeometryService.relation用法及代碼示例

基本信息

以下是所在類或對象的基本信息。

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

ESM: import GeometryService from "@arcgis/core/tasks/GeometryService";

類: esri/tasks/GeometryService

繼承: GeometryService > Task > Accessor

自從:用於 JavaScript 4.0 的 ArcGIS API

用法說明

GeometryService.relation函數(或屬性)的定義如下:

relation (params, requestOptions) {Promise<Polygon[]>}


從屬於指定關係的輸入幾何數組計算幾何對的集合。假設這兩個陣列位於相同的空間參考中。這些關係在 2D 中進行評估。 Z-coordinates 未使用。幾何類型不能在數組中混合。

參數:

類型說明

執行比較所需的參數集。

requestOptions Object
可選的

用於數據請求的附加 options

返回:

類型 說明
Promise<Polygon[]> 解析後,返回滿足關係的 Polygon 幾何數組。

例子:

let geometryService = new GeometryService( ... );

let relationParams = new RelationParameters({
  geometries1: geometries[0],
  geometries2: geometries[1],
  relation: "within"
});

geometryService.relation(relationParams).then( ... );

相關用法


注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 GeometryService.relation。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。