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
I would like to use the add shape file widget in my WAB project; however I am experience some difficulty incorporating this widget due to the fact I am working within a corporate network in highly secured development environment.
In efforts to trouble shoot my issue, it looks like line #68 of your code sets the shape files to pull from www.arcgis.com. Should this line be changed to the classified equivalent of the same web site. I tried changing line #68 to read -- var portalUrl = "https://portal.Xxx.cloud.XX.gov"; which is the classified equivalent of www.arcgis.com
Is this a good place to start trouble shooting? What other parts of this widget code should I look into changing?
Just FYI: in the next update to Web AppBuilder embedded in ArcGIS Online, we're enhancing the Add Data widget to support adding local data files, including shapefiles. The update is planned for mid-Dec.
Hope this helps,
FYI: list of supported data types from local files include: shapefile, CSV, GPX, and GeoJSON. Sorry, KMZ is not supported. Please submit an enhancement on the ArcGIS Ideas site for Web AppBuilder: ArcGIS Ideas
Hope this helps,
Do you have any updates as to when the capability to add shape files,KML,CSV, etc files locally into the web app builder through the Add Data Widget? In your Nov 2016 post you mentioned that the widget update is planned for mid-Dec.