Load Shapefile Widget

882
8
01-24-2012 08:01 AM
ChadHinckley1
New Contributor
I also get an 2036 error when trying to run the load shapefile widget. Here is the code. Please help!

<widget label="Load Shape Files" x="400" y="60"
icon="widgets/ShapeFiles/images/shapefiles.png"
config="widgets/ShapeFiles/ShapeFiles.xml"
url="widgets/ShapeFiles/ShapeFiles.swf"/>

Thanks,

IdahoHunter
Tags (2)
0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus
Chad,

   Are you using the compiled or uncompiled version of the Flex Viewer? Do you actually have this file widgets/ShapeFiles/ShapeFiles.swf in that folder?
0 Kudos
ChadHinckley1
New Contributor
I am using the compiled version.  I do have the widgets/Shapefiles/Shapefile.sfw. The Widget shows up in my application, but when i click on it i gives me the 2036 error.

Thanks,

IdahoHunter
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chad,

   What does your ShapeFiles.xml look like?
0 Kudos
ChadHinckley1
New Contributor
Robert,

Here is the ShapeFile.xml.

<configuration>
<geometryservice>http://arcgis.ecan.govt.nz/ArcGIS/rest/services/Geometry/GeometryServer</geometryservice>
<spatialref>27200</spatialref>
<distanceunits>
  <distanceunit abbr="m" conversion="1">Meters</distanceunit>
  <distanceunit abbr="km" conversion=".001">Kilometers</distanceunit>
  <distanceunit abbr="ft" conversion="3.2808">Feet</distanceunit>
  <distanceunit abbr="mi" conversion="0.000621">Miles</distanceunit>
</distanceunits>
<areaunits>
  <areaunit abbr="sq m" conversion="1">Square Meters</areaunit>
  <areaunit abbr="sq km" conversion="0.000001">Square Kilometers</areaunit>
  <areaunit abbr="sq ft" conversion="10.763910417">Square Feet</areaunit>
  <areaunit abbr="sq mi" conversion="0.0000003861021">Square Miles</areaunit>
  <areaunit abbr="ac" conversion="0.00024710538147">Acres</areaunit>
  <areaunit abbr="ha" conversion="0.0001">Hectares</areaunit>
</areaunits>
</configuration>

Thanks,
Chad
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chad,

   Are you trying to use the Flex Viewer 2.2 widget in the current Flex Viewer 2.5?..
0 Kudos
ChadHinckley1
New Contributor
Robert,

Yes i am using the 2.2 version widget.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chad,

   That is the issue. You can not use a Flex Viewer 2.2 widget in Flex Viewer 2.5, many times there has been changes to the core Flex Viewer and older widgets will not work unless recompiled for the latest version and as you can see if you look at peoples comments on the widgets download page no one has sucessfully recompiled for 2.5.
0 Kudos
ChadHinckley1
New Contributor
Robert,

Thank you for your help.

Chad
0 Kudos