-
createFeatureLayer
()
{Promise<FeatureLayer>}
- 自从:ArcGIS 适用于 JavaScript 4.7 的 API
一种基于子层配置创建FeatureLayer 实例的便捷方法,包括dynamic sources。这允许您利用子层中不支持的 FeatureLayer 函数,例如 Smart Mapping creator functions 。
返回:
类型 说明 Promise<FeatureLayer> 解析为 FeatureLayer 的 Promise 与调用此方法的子层实例的配置相匹配。 例子:
let sublayer = mapImageLayer.findSublayerById(0); // when the createFeatureLayer() promise resolves, load the FeatureLayer // and pass it to the createParameters function sublayer.createFeatureLayer() .then(function(featureLayer){ return featureLayer.load(); }) .then(createParameters); function createParameters (featureLayer) { let colorParams = { layer: featureLayer, basemap: map.basemap, field: "POPULATION", normalizationField: "SQ_MILES", legendOptions: { title: "Population density (sq. miles)" } }; } // when the promise resolves, apply the renderer to the sublayer colorRendererCreator.createContinuousRenderer(colorParams) .then(function(response){ sublayer.renderer = response.renderer; });
基本信息
以下是所在类或对象的基本信息。
AMD:
require(["esri/layers/support/Sublayer"], (Sublayer) => { /* code goes here */ });
ESM:
import Sublayer from "@arcgis/core/layers/support/Sublayer";
类:
esri/layers/support/Sublayer
继承: Sublayer > Accessor
自从:用于 JavaScript 4.1 的 ArcGIS API
用法说明
Sublayer.createFeatureLayer
函数(或属性)的定义如下:
相关用法
- JavaScript ArcGIS Sublayer.JoinTableDataSource用法及代码示例
- JavaScript ArcGIS Sublayer.DynamicDataLayer用法及代码示例
- JavaScript ArcGIS Sublayer.opacity用法及代码示例
- JavaScript ArcGIS Sublayer.TableDataSource用法及代码示例
- JavaScript ArcGIS Sublayer.visible用法及代码示例
- JavaScript ArcGIS Sublayer.labelingInfo用法及代码示例
- JavaScript ArcGIS Sublayer.DynamicMapLayer用法及代码示例
- JavaScript ArcGIS Sublayer.title用法及代码示例
- JavaScript ArcGIS Sublayer.maxScale用法及代码示例
- JavaScript ArcGIS Sublayer.fields用法及代码示例
- JavaScript ArcGIS Sublayer.getFieldDomain用法及代码示例
- JavaScript ArcGIS Sublayer.labelsVisible用法及代码示例
- JavaScript ArcGIS Sublayer.fieldsIndex用法及代码示例
- JavaScript ArcGIS Sublayer.id用法及代码示例
- JavaScript ArcGIS Sublayer.definitionExpression用法及代码示例
- JavaScript ArcGIS Sublayer.when用法及代码示例
- JavaScript ArcGIS Sublayer.sublayers用法及代码示例
- JavaScript ArcGIS Sublayer.renderer用法及代码示例
- JavaScript ArcGIS Sublayer.minScale用法及代码示例
- JavaScript ArcGIS Sublayer.QueryTableDataSource用法及代码示例
- JavaScript ArcGIS Sublayer.RasterDataSource用法及代码示例
- JavaScript ArcGIS Sublayer.popupTemplate用法及代码示例
- JavaScript ArcGIS Sublayer.source用法及代码示例
- JavaScript ArcGIS Sublayer用法及代码示例
- JavaScript ArcGIS SubtypeSublayer.renderer用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 Sublayer.createFeatureLayer。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。