Select to view content in your preferred language

Load own content shapefiles in Flex Viewer

3566
6
Jump to solution
01-15-2013 08:43 AM
AndreiNacu
Emerging Contributor
Hi,

I am new to Flex Viewer and I want to create my first map using a OSM background and some shapefiles as operational layers. I uploaded the first shapefile to arcgis.com (my content) and shared it to everyone: (http://www.arcgis.com/home/item.html?id=e19e0032226d4687ba8e3e8d9165e6b0).

Now, why can't I access this shapefile from Flex Viewer. Am I missing something?

Thanks,
Andrei
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Andrei,
   
    So I looks like you have built you Flex Viewer site using Application Builder for Flex. If that is the case than you need to be using the For_AppBuilder3.1 folder and the zip inside it to add this custom widget to your Application Builder site. Refer to this page for details:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Managing_custom_widgets/01m3000...

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:

View solution in original post

0 Kudos
6 Replies
by Anonymous User
Not applicable
Shapefiles are not supported in the FlexViewer. Operational layers maybe accessed by specifying the REST endpoint URL address for an ArcGIS Server instance.  For ArcGIS Server, the default endpoint is: http://<host>/<instance>/services/<folder>.

Here is the URL for a sample map service  - http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/M...

Other layer types are specified in the link below:

Layer tag
http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#//01m30000000p000000
0 Kudos
AndreiNacu
Emerging Contributor
Thanks for your reply pho.

I don't understand why there's an option to access 'my contents' from arcgis.com but no support for importing shapefiles.

In this case I will install the ShapeFiles widget for Flex Viewer 3.1. I think it can do what I want.
Andrei
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Andrei,

    You say you added the compiled version and followed all the instructions in the ReadMe.txt? Can you verify your path to the swf?
i.e. widgets/ShapeFiles/ShapeFilesWidget.swf
0 Kudos
AndreiNacu
Emerging Contributor
Hi Robert,

The path to the swf is: C:\Program Files (x86)\ArcGIS Viewer for Flex\flexviewer\widgets\ShapeFiles\ShapeFilesWidget.swf

In the modules folder (ArcGIS Viewer for Flex\modules) I see there's a swf module file for each widget. Perhaps the ShapeFiles should have one as well.

Andrei
0 Kudos
AndreiNacu
Emerging Contributor
Robert, here is some more information.

The en_US config.xml was edited like this:

    <widgetcontainer layout="float">
        <widget
            label="Load Shape Files" x="400" y="60"
            icon="widgets/ShapeFiles/assets/images/shapefiles.png"
     config="widgets/ShapeFiles/ShapeFilesWidget.xml"
     url="widgets/ShapeFiles/ShapeFilesWidget.swf"/>
        <widget
            icon="assets/images/i_draw2.png"
            label="Draw"
            config="widgets/Draw/DrawWidget.xml"
            url="widgets/Draw/DrawWidget.swf"/>
        <widget
            icon="assets/images/i_print.png"
            label="Print"
            config="widgets/Print/PrintWidget.xml"
            url="widgets/Print/PrintWidget.swf"/>
      </widgetcontainer>
</configuration>


And this is the 'missing widget module' error: http://img838.imageshack.us/img838/1074/flexviewerwidgeterror.png
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Andrei,
   
    So I looks like you have built you Flex Viewer site using Application Builder for Flex. If that is the case than you need to be using the For_AppBuilder3.1 folder and the zip inside it to add this custom widget to your Application Builder site. Refer to this page for details:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Managing_custom_widgets/01m3000...

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:

0 Kudos