arcgis js 之 featureLayer创建模板
arcgis js 之 featureLayer创建模板
简单创建,用作拷贝:
let FeatureLayer = await arcgisPackage.FeatureLayer let layer = new FeatureLayer({ id: 'gj', title: '保护区边界', url: mapConfig.areaUrl, renderer: renderer, outFields: ['*'], // 服务端获取图层时定义获取全部属性字段 spatialReference: { wkid: 3857 }, popupTemplate: { title: '{name}', content: [ { type: 'fields', fieldInfos: [ { fieldName: 'name', label: '名称' }, { fieldName: 'pro', label: '省份' } ] } ] } })
钻研不易,转载请注明出处、、、、、、