Add Shapefile Widget

12768
28
07-30-2015 03:25 PM
NathanStrout2
Deactivated User

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
DerekLaw
Esri Esteemed Contributor

Hi Ben,

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,

0 Kudos
JulieK
by
Regular Contributor

Hi Derek,

The Add Data widget is really cool but this doesn't let me save the added shapefile. Am I missing something? Please let me know your thoughts.

Thanks,

Julie

0 Kudos
DerekLaw
Esri Esteemed Contributor

Hi Julie,

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?

0 Kudos
LefterisKoumis
Frequent Contributor

If I understand you correctly, you mean to save the imported shp file to be part of your map for later sessions?

0 Kudos
HayleighPervorse1
Emerging Contributor

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?

Thanks,

Hayleigh Pervorse

0 Kudos
DerekLaw
Esri Esteemed Contributor

Hi Hayleigh,

> ... 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,

0 Kudos
JoseBarrero1
Emerging Contributor

Hi Nathan,

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.

Jose

0 Kudos
IanFarrar
Emerging Contributor

Is it possible to increase the number of data points from 1000?  Are their specific server settings?

Thanks

Ian

0 Kudos
GilbertoMatos
Frequent Contributor

Hello!

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?

Thank you!
Gilberto

0 Kudos