-
layerId
Number
要素服務圖層的圖層 ID 或圖層索引。當從包含多個圖層的服務加載帶有 PortalItem 屬性的單個 SubtypeGroupLayer 時,這特別有用。您可以在以下兩種情況之一指定此值:
- 通過 PortalItem 屬性加載圖層時。
- 將圖層 url 直接指向要素服務時。
如果在上述任一情況下均未指定 layerId,則選擇服務中的第一層 (
layerId = 0
)。例子:
// loads the third layer in the given Portal Item const layer = new SubtypeGroupLayer({ portalItem: { id: "8d26f04f31f642b6828b7023b84c2188" }, layerId: 2 });
// If not specified, the first layer (layerId: 0) will be returned const layer = new SubtypeGroupLayer({ portalItem: { id: "8d26f04f31f642b6828b7023b84c2188" } });
// Can also be used if URL points to service and not layer const layer = new SubtypeGroupLayer({ // Notice that the url doesn't end with /2 url: "http://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/MonterreyBayCanyon_WFL/FeatureServer", layerId: 2 });
// This code returns the same layer as the previous snippet const layer = new SubtypeGroupLayer({ // The layer id is specified in the URL url: "http://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/MonterreyBayCanyon_WFL/FeatureServer/2", });
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/layers/SubtypeGroupLayer"], (SubtypeGroupLayer) => { /* code goes here */ });
ESM:
import SubtypeGroupLayer from "@arcgis/core/layers/SubtypeGroupLayer";
類:
esri/layers/SubtypeGroupLayer
繼承: SubtypeGroupLayer > Layer > Accessor
自從:用於 JavaScript 4.20 的 ArcGIS API
用法說明
SubtypeGroupLayer.layerId
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS SubtypeGroupLayer.on用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.sublayers用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.timeOffset用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.fields用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.maxScale用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.queryFeatureCount用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.queryAttachments用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.timeExtent用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.objectIdField用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.queryExtent用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.fieldsIndex用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.getFieldDomain用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.visible用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.refreshInterval用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.createQuery用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.fullExtent用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.when用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.addAttachment用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.effect用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.formTemplate用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.definitionExpression用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.version用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.opacity用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.capabilities用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.url用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 SubtypeGroupLayer.layerId。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。