LocalLayerWidget 1.5.1
The LocalLayer Widget for ArcGIS Web AppBuilder is intended to allow the direct addition of ArcGIS for Server Mapservices to an ArcGIS Web AppBuilder application, without needing to wrap the desired services in an ArcGIS Online/Portal Web Map. The Legend, LayerList, and AttributeTable widgets should continue to work with your local layers.
###Setting up the Widget
Please note that this is not an in-panel widget. To add it to your ArcGIS Web AppBuilder, add the widget to your \client\stemapp\widgets directory, and add a reference to the widget in the standard default2Dapp configuration located at \client\builder\predefined-apps\default2DApp\config.json, under the widgetOnScreen section.
Example:
"widgetOnScreen": {
"widgets": [
{
"uri": "widgets/LocalLayer/Widget",
"visible": false
},
...
]
}
var url = this.originOperLayer.url + '/' + subId;
To:
var url = this.originOperLayer.layerObject.url + '/' + subId;
And line 406 should be changed from:
var url = this.originOperLayer.url + '/layers';
To:
var url = this.originOperLayer.layerObject.url + '/layers';
Example:
"widgetOnScreen": {
"widgets": [
{
"uri": "widgets/LocalLayer/Widget",
"visible": false
},
...
]
}
- open the client\stemapp\themes\TabTheme\layouts\default\config.json in a text editor and add the code block above. This will take care of adding the Local Layer widget to default
Example:
"map": {
...
"mapOptions": {
"showLabels":true,
"extent": {
...
}
}
}