-
predominantCategories
(params)
{Promise<PredominantCategoriesResult>}
根據給定的一組競爭數字字段確定圖層的主要類別,並返回屬於每個類別的要素數。
參數:
規格:類型 說明 params Object有關每個參數的詳細信息,請參見下表。
規格:為給定的
fields
集生成主要類別的層。用於確定主要類別的數字字段數組。這些字段必須都是數字字段,並且它們必須是競爭的或互補的(例如,按家庭使用的語言計算的人口總數,或按裁剪類型劃分的收獲麵積,或候選人或政黨的選舉結果)。
可選的 將在其中呈現要素的視圖。
signal可選的 允許可取消的請求。如果取消,promise 將被拒絕,並出現名為
AbortError
的錯誤。另見AbortController。返回:
類型 說明 Promise<PredominantCategoriesResult> 返回解析為 PredominantCategoriesResult 的 Promise。 例子:
predominantCategories({ layer: featureLayer, fields: [ "corn_acres", "cotton_acres", "wheat_acres", "soybeans_acres", "vegetables_acres" ], view: mapView }).then(function(stats){ console.log(stats.predominantCategoryInfos); });
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/smartMapping/statistics/predominantCategories"], (predominantCategories) => { /* code goes here */ });
ESM:
import predominantCategories from "@arcgis/core/smartMapping/statistics/predominantCategories";
函數:
esri/smartMapping/statistics/predominantCategories
自從:用於 JavaScript 4.13 的 ArcGIS API
用法說明
predominantCategories.predominantCategories
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS predominance.createRenderer用法及代碼示例
- JavaScript ArcGIS predominance.getSchemeByName用法及代碼示例
- JavaScript ArcGIS predominanceUtils.getPredominanceExpressions用法及代碼示例
- JavaScript ArcGIS predominance.cloneScheme用法及代碼示例
- JavaScript ArcGIS predominance.getSchemes用法及代碼示例
- JavaScript ArcGIS predominance.getSchemesByTag用法及代碼示例
- JavaScript ArcGIS promiseUtils.eachAlways用法及代碼示例
- JavaScript ArcGIS promiseUtils.isAbortError用法及代碼示例
- JavaScript ArcGIS promiseUtils.debounce用法及代碼示例
- JavaScript ArcGIS promiseUtils.create用法及代碼示例
- JavaScript ArcGIS promiseUtils.resolve用法及代碼示例
- JavaScript ArcGIS print.execute用法及代碼示例
- JavaScript ArcGIS promiseUtils.reject用法及代碼示例
- JavaScript promise reject()用法及代碼示例
- JavaScript ArcGIS projection.load用法及代碼示例
- JavaScript ArcGIS projection.getTransformations用法及代碼示例
- JavaScript ArcGIS promiseUtils.createAbortError用法及代碼示例
- JavaScript ArcGIS projection.project用法及代碼示例
- JavaScript parseInt()用法及代碼示例
- JavaScript parseFloat()用法及代碼示例
- JavaScript performance.now()用法及代碼示例
- JavaScript ArcGIS SceneView double-click事件用法及代碼示例
- JavaScript ArcGIS geometryEngineAsync.overlaps用法及代碼示例
- JavaScript ArcGIS Expand.when用法及代碼示例
- JavaScript ArcGIS Sublayer.JoinTableDataSource用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 predominantCategories.predominantCategories。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。