I just upgraded to version 3.7 of ArcGIS Viewer for Flex. I also deleted the old 3.6 widgets and then added in the 3.7 versions. Everything works fine (elayerlist, identify, swipespotlight) except the shapefile widget. I get a 2036 error in Firefox browser (2035 error in Chrome). Take a look:
Here is a snippet from my config.xml:
<widgetcontainer layout="float">
<widget url="widgets/Draw/DrawWidget.swf" config="widgets/Draw/DrawWidget.xml" label="Draw" icon="assets/images/i_draw2.png"/>
<widget url="widgets/Print/PrintWidget.swf" config="widgets/Print/PrintWidget.xml" label="Print" icon="assets/images/i_print.png"/>
<widget url="widgets/Shapefiles/ShapefilesWidget.swf" config="widgets/Shapefiles/ShapefilesWidget_1.xml" label="Shapefile Widget" icon="assets/images/shapefiles.png"/>
<widget url="widgets/Bookmark/BookmarkWidget.swf" config="widgets/Bookmark/BookmarkWidget_1.xml" label="Bookmark" icon="assets/images/i_bookmark.png"/>
<widget url="widgets/Time/TimeWidget.swf" config="widgets/Time/TimeWidget_1.xml" label="Time" icon="assets/images/i_clock.png"/>
<widget url="widgets/Legend/LegendWidget.swf" config="widgets/Legend/LegendWidget_1.xml" label="Legend" icon="assets/images/Legend32.png"/>
<widget url="widgets/LayerList/LayerListWidget.swf" config="widgets/LayerList/LayerListWidget_1.xml" label="Layer List" icon="assets/images/i_layers.png"/>
<widget url="widgets/eLayerList/eLayerListWidget.swf" config="widgets/eLayerList/eLayerListWidget_1.xml" label="Enhanced Layer List" icon="assets/images/i_folder.png"/>
<widget url="widgets/SwipeSpotlight/SwipeSpotlightWidget.swf" config="widgets/SwipeSpotlight/SwipeSpotlightWidget_1.xml" label="Swipe Spotlight Widget" icon="assets/images/i_swipe.png"/>
<widget url="widgets/Identify/IdentifyWidget.swf" config="widgets/Identify/IdentifyWidget_1.xml" label="Identify Widget" icon="assets/images/i_info.png"/>
</widgetcontainer>
Also, here's the contents of my ShapefilesWidget_1.xml:
<?xml version="1.0" ?>
<configuration>
<defaultlabelplacement>middle</defaultlabelplacement>
<autozoom>true</autozoom>
<symbols>
<simplefillsymbol color="0x4dfe45" alpha="0.6" style="solid">
<outline color="0x088802" alpha="0.8" width="1" style="solid"/>
</simplefillsymbol>
<simplemarkersymbol color="0x4dfe45" alpha="0.6" style="circle" angle="0" size="15">
<outline color="0x088802" alpha="0.8" width="1" style="solid"/>
</simplemarkersymbol>
<simplelinesymbol color="0x088802" alpha="0.8" width="2" style="solid"/>
<TextSymbol color="0x000000" size="12" bold="false" italics="false" underline="false" font="null"/>
</symbols>
<labels>
<textplacementmiddle>Middle</textplacementmiddle>
<textplacementabove>Above</textplacementabove>
<textplacementbelow>Below</textplacementbelow>
<textplacementend>End</textplacementend>
<textplacementstart>Start</textplacementstart>
<textboldlabel>B</textboldlabel>
<textboldtooltip>Bold</textboldtooltip>
<textitaliclabel>I</textitaliclabel>
<textitalictooltip>Italics</textitalictooltip>
<textunderlinelabel>U</textunderlinelabel>
<textunderlinetooltip>Underline</textunderlinetooltip>
<instructions>To load a shapefile the files must be zipped.
At a minimum there must be 2 files in the zip, 1 .shp, 1 .dbf, and an optional .prj file.
Click the button below to upload a shapefile from your computer.
To change symbology and other preferences click on the wrench icon above.</instructions>
<loadbutton>Load Local Shapefile...</loadbutton>
<addbutton>Load Shapefile</addbutton>
<optionsbutton>Preferences</optionsbutton>
<readingmessage>Reading shapefile</readingmessage>
<reprojectingmessage>Reprojecting</reprojectingmessage>
<numberoffeaturesmessage>Number of Features:</numberoffeaturesmessage>
<addedmessage>Added Shapefiles:</addedmessage>
<addlabels>Label Features</addlabels>
<labelplacement>Label placement</labelplacement>
<includeoutline>Include Outline</includeoutline>
<labelstexttoadd>Labels</labelstexttoadd>
<configresultmessage>Configure Shapefile</configresultmessage>
<removeresultmessage>Remove Shapefile</removeresultmessage>
</labels>
</configuration>
The files referenced in config.xml DO exist. It's weird that all the other widgets work fine. Any ideas?
Solved! Go to Solution.
Donald,
Thanks for reporting this issue. I have fixed it in version 3.7.1 (available now).
Donald,
I can not seem to find the swf at this url:
https://www.sciencebase.gov/flexviewer/test2/widgets/Shapefiles/ShapefilesWidget.swf
Can you verify that the swf is actually there?
Looking closer at it... no, it doesn't exist.
Strange, when I add the Shapefile widget to an app, it creates a .swf named:
ShapeFilesWidget.swf
The reference to that .swf is automatically created in config.xml:
widgets/Shapefiles/ShapefilesWidget.swf
If I change the lowercase 'f' to 'F' in config.xml, everything works. Not sure why it gets generated wrong though.
Donald,
I will have to look into that and see if there is something in the code that is doing that.
Same for me about the case. But the 3.7 shapefile widget works fine for me.
config.xml:
<widget url="widgets/Shapefiles/ShapefilesWidget.swf" config="widgets/Shapefiles/ShapefilesWidget_1.xml" label="Load Shapefile Tool" icon="assets/images/shapefiles.png" x="150" y="250"/> |
Note that this code was untouched by me during upgrade from Flex 3.6, and was likely carried over from the Flex 3.6 version of the viewer.
Donald,
Thanks for reporting this issue. I have fixed it in version 3.7.1 (available now).
Thanks for the help and for all the useful, free widgets.
I tested 3.7.1. It works as expected. Thanks for the quick fix!
Many thanks, Robert!!!!!