Esri / Esri/workflowmanager-viewer-js
Support for FeatureLayers
- Dominant language
- JavaScript
- Stars
- 27
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
Please add functionality to add feature layers to show features on top of the basemap.
Here is an example of what i did.
In AppConfig.js i added...
```customLayers: [
{
url: "https://myserver/server/rest/services/layers/MapServer",
options: {
id: "mapLayer1",
imageParameters: {
layerIds: [1, 2, 3],
layerOption: "show"
},
opacity: 0.8,
showAttribution: false
}
}
]
```
Then in EsriMap.js i added this...
```
if (this.mapConfig.customLayers) {
var customLayers = this.mapConfig.customLayers;
for (var i = 0; i < customLayers.length; i++) {
var customLayer = customLayers[i];
var layer;
if (customLayer.options && customLayer.options.imageParameters) {
var params = new esri.layers.ImageParameters();
var keys = Object.keys(customLayer.options.imageParameters);
arrayUtil.forEach(keys, function (key) {
params[key] = customLayer.options.imageParameters[key];
});
customLayer.options.imageParameters = params;
}
layer = new esri.layers.ArcGISDynamicMapServiceLayer(customLayer.url, customLayer.options);
if (layer) {
this.map.addLayer(layer);
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.