Select to view content in your preferred language

Shapefiles Widget for ArcGIS Viewer for Flex 3.0

8685
17
12-14-2012 06:46 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   I am pleased to announce the release of my Enhanced Shapefile Widget for ArcGIS Viewer for Flex 3.0

The ShapeFiles Widget version 3.0 for Flex Viewer 3.0 is a widget that allows you to add shapefiles to the
viewer from the client machine if they are zipped. Shapefiles are made up of multiple file (i.e. xyz.shp, xyz.dbf, xyz.shx,
xyz.prj, etc). The fact that a shapefile is made up of these multiple files is the reason that they need to be zipped. Flash
Player allows the client to upload one file at a time. The minimum files necessary in the zipped file are the .shp and .dbf,
it is also advisable to include the .prj file as well. This widget takes the initial work of Abdul Mannan Mohammed, the
mods of Wesley Chow and Iain Campion and enhance then with the following features.

Feature include:

    * Added shapefiles are re-projected to the map wkid.
    * Adding labeling based on the first string field in the shapefile is optional and will be added as a seperate FeatureLayer.
    * Each Shapefile is added as a FeatureLayer so that it appears in the LayerList Widget, TOC Widget, MapSwitcher Widget.
    * The widget has been localized so that all text in the widget can be changed to the users locale.
    * The widget has a ShapeFiles.xml that allows for widget options to be configured.
    * Each added shapefile is displayed in the widgets results and has a remove button.
    * When the widget is closed the shapefiles remain in the map (unless you choose to remove them using the widget).
    * Options for symbology and labeling are now very extensive.
    * UX (user Experience) and GUI has been greatly improved.
    * When a shapefile is removed and it has been labeled, the corresponding labels are also removed.

http://www.arcgis.com/home/item.html?id=2e9096c5d5044d39a264df759611686f
Tags (2)
0 Kudos
17 Replies
AhmadShahryar
Emerging Contributor
I have tried a shapefile having less number of polygons but it is still reading shapefile after about 20 minutes.
Countries.zip was shapefile I tried to attach and the error that I showed you appeared.Actually the shapefile is not being attached.
Here is the link to Countries.zip shapefile
http://sdrv.ms/1cuseWL

Here is the link to shapefile having less polygons.
http://sdrv.ms/1k3IRPO

And also please mention the number of polygons that can be displayed in Flex
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ahmad,

   There is not an actual number of  records I can give, it is more dependent on the complexity of the  shapefile features. That the countries shapefile that you are trying to  use. It has 264 polygons with 1,950,030 vertices. That is way to much  data as the shapefile widget uses client side graphics in the Browser  plugin (As Flash Player is a plug in for your browser it has limited memory allocation). The big thing to realize it the the Viewer is NEVER going to be ArcMap on the Web. I am looking into the issue with the NowsheraUC.shp you are attempting to use (as it only has 44 Polygons and 2,423 vertices).
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ahmad,

   I have found that there is an error in your NowsheraUC shapefile. You can fix it by adding it to ArcMap and then right clicking on it in the TOC and choosing Data>Export Data... and making a new shapefile (call it NowsheraUC2 or something). Now when you zip up that shapefile it will work fine. Attached it the one I fixed exactly as outlined above.
0 Kudos
NazriShah
Emerging Contributor
Hi Robert,

I have some problem with shapefiles widget... when i upload the shapefile that contain point and polygon,
the output in TOC works fine,

but when i try to print it, the legend shows label error for polygon...

[ATTACH=CONFIG]33908[/ATTACH]
[ATTACH=CONFIG]33909[/ATTACH]
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nazri,

   The ArcGIS Server print service is known to have some issues with FeatureLayer names in the print but I have not seen it do that before. Have you tried a differnt polygon shapefile (with a different name)?
0 Kudos
NazriShah
Emerging Contributor
Nazri,

   The ArcGIS Server print service is known to have some issues with FeatureLayer names in the print but I have not seen it do that before. Have you tried a differnt polygon shapefile (with a different name)?


Yes, i already tried with different polygon shapefile but same result..

i attach sample polygon file that i use..
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nazri,

   This is definitely an ArcGIS Server print service issue. When you inspect what is being sent to ArcGIS Server it has the proper name for the layer

{"id":"district.zip - district","maxScale":0,"title":"district.zip - district","minScale":0,"featureCollection":
This is something that I can not fix, it is an esri issue.
0 Kudos
NazriShah
Emerging Contributor
Ok. Tq for your help.
0 Kudos