Esri / Esri/workflowmanager-viewer-js

Support for FeatureLayers

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.