Add Shapefile Widget

11487
28
07-30-2015 03:25 PM
NathanStrout2
New Contributor III

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

Happy mapping!

28 Replies
RebeccaStrauch__GISP
MVP Emeritus
0 Kudos
MichaelRobb
Occasional Contributor III

does not work...fail.png

0 Kudos
AntoineBartholomew
New Contributor III

Hello Nathan

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? 

0 Kudos
DerekLaw
Esri Esteemed Contributor

All,

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,

MichaelRobb
Occasional Contributor III

Dont suppose 'add data' would include KMZ files?

Is there a list of the supported data types from local files that will be supported?

0 Kudos
DerekLaw
Esri Esteemed Contributor

Hi Michael,

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,

GrantHerbert
Occasional Contributor II

Is there a plan to add filegeodabase featureclasses to the supported data types?

0 Kudos
DerekLaw
Esri Esteemed Contributor

Hi Grant,

No, we don't have this on the road map at this time. Please submit an enhancement on the ArcGIS Ideas site, under the Web AppBuilder category: ArcGIS Ideas 

Hope this helps,

0 Kudos
AntoineBartholomew
New Contributor III

Hello Derek

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.

Thanks

0 Kudos