Hi all, I just put together a quick widget for adding a zipped shapefile to a webmap as a new operational layer. This is very helpful with custom geoprocessing services that need a feature/operational layer as input. I essentially just wrapped the AddShapefile jsapi sample from Esri so the interface is pretty simple so you can customize the html as needed.
You can download or fork it on GitHub: https://github.com/URSpatial/WAB_AddShapefile
We currently have an open bug with the Add Data widget in Web AppBuilder Developer Edition and using it with Portal for ArcGIS 10.5.1 (BUG #000105062) when attempting to add a shapefile. Although we've seen different error messages returned.
Can you please contact Esri Tech Support, mention this bug, and provide more detailed repro info so we can investigate further?
Hope this helps,
FYI, the Add Data widget—Web AppBuilder for ArcGIS | ArcGIS help documentation.
> The Add Data widget is really cool but this doesn't let me save the added shapefile.
Can you please elaborate on what you want to do?
Hi Derek Law ,
We are using WAB 2.10 and the add data widget is giving us an 'Unable to generate features' error for a shapefile with <1000 features. It has around 800 features but is failing to add. When cutting the data in half (around 400 features) it loads no problem. Isn't this widget supposed to support up to 1000 features? I also tried using the Add data widget out of the box in Portal 10.6.1, same error. Just "Unable to generate features" which is a very generic error, assuming if it was over the limit we would get an error saying the file is too big?
> ... Isn't this widget supposed to support up to 1000 features?
I believe the limit for the Add Data widget is 1000 features or if the file is more than 1 MB in size.
> ... which is a very generic error, assuming if it was over the limit we would get an error saying the file is too big?
Please contact esri Tech Support and log an enhancement request; I believe the generic error message is expected behavior.
Hope this helps,
The AddShapefile doesn't allow me to set up on the çhose widget window', when you load it to the web map. Am I missing something?
Thank you in advance for your response.
I downloaded and managed to include in my application built with WAB 2.2, the widget to add shapefiles, in the first message of the post, made by nathan_strout I'm able to load shapefiles of points, lines and polygons normally, however, I'm not able to make after a shapefile import, no layerlist widget is created a new "layer" with imported shapefile. Can anyone give me a hint of what code to change?