Select to view content in your preferred language

Viewing ArcGIS.com maps with a flex viewer

2341
21
12-01-2011 01:30 AM
JonBall
Deactivated User
Hi

I am new to ArcGIS online and to Flex and am trying to create a map that I can then view through an ArcGIS Viewer for Flex. I have made some progress but cannot find a way to gain the full benefits of the Flex Viewer for my ArcGIS.com map. For instance I would like to use the search widget to find features on the map.

My ArcGIS.com map consists of 2 baselayers and a shapefile layer of 45 points. I wish to be able to interogate this layer in the Flexviewer, but I cannot find a method that will allow me to specify my points layer as an operational layer in the flex viewer, so I cannot quite get my hands on a lot of the functionality that I was looking for. (The only way I could access my ArcGIS online content was by using "itemid=" in the <map> tag, which seems to disable all baselayers and operational layers in the flex map).

Does anyone know of a way to achieve this?

Thanks for reading!

Jon B
Wildlife Research Technician
Tags (2)
0 Kudos
21 Replies
RobertScheitlin__GISP
MVP Emeritus
Jon,

    To use a layer in a task like the QueryTask (which the search widget uses) is has to come from a REST end point from ArcGIS Server. If esri allowed you to use ArcGIS online then they would basically be shooting themselves in the foot, as this would eliminate the need for many to purchase ArcGIS Server and host their own data.
0 Kudos
JonBall
Deactivated User
Thanks Robert - I had feared as much. I can add some functionality to my ArcGIS.com map when using the flex viewer but layer-based stuff won't work. I guess I have to wiat for ArcGIS.com to offer subscriptions, but I am not sure that I will be able to find money for this - I am working for a not-for-profit organisation.

Jon

P.S. Thanks for all your great widgets!
0 Kudos
JonBall
Deactivated User
Thanks Richard - I had feared as much. I can add some functionality to my ArcGIS.com map when using the flex viewer but layer-based stuff won't work. I guess I have to wiat for ArcGIS.com to offer subscriptions, but I am not sure that I will be able to find money for this - I am working for a not-for-profit organisation.

Jon

P.S. Thanks for all your great widgets!
0 Kudos
VeronicaMoore1
Emerging Contributor
I have added some shapefiles (City voting locations http://sumtercity.maps.arcgis.com/home/item.html?id=11e3cf7ef41e4c31a8196467b4f72ed1) to my account and made them public. I also created a web map
(test 2  http://sumtercity.maps.arcgis.com/home/webmap/viewer.html?webmap=c4670a647b2f42e3b6818edc7cb485cd ) and is public. I�??m trying to consume that map or feature service on my flex map, I thought that it was possible but I can�??t get the Web map configuration helper to work.
Can you guide me in the process I have to follow to produce a web map that FLEX can consume?
Thank you so much!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Veronica,

   Are you talking about using Application builder or the Flex Viewer uncompiled in Flash Builder or something else?
0 Kudos
VeronicaMoore1
Emerging Contributor
Veronica,

   Are you talking about using Application builder or the Flex Viewer uncompiled in Flash Builder or something else?


I'm using the compiled version of the ArcGIS Viewer for Flex 2.3.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Veronica,

   Not sure why you are using 2.3 when you could be using 3.0 but anyway... Here is what you need to add to the main config.xml

        <operationallayers>
            <layer label="City_voting_locations" type="feature" visible="true" alpha="1" mode="onDemand" url="http://services.arcgis.com/4B9WU9185SohZnyi/arcgis/rest/services/City_voting_locations/FeatureServer/0"/>
        </operationallayers>


Don't forget to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos
VeronicaMoore1
Emerging Contributor
Veronica,

   Not sure why you are using 2.3 when you could be using 3.0 but anyway... Here is what you need to add to the main config.xml

        <operationallayers>
            <layer label="City_voting_locations" type="feature" visible="true" alpha="1" mode="onDemand" url="http://services.arcgis.com/4B9WU9185SohZnyi/arcgis/rest/services/City_voting_locations/FeatureServer/0"/>
        </operationallayers>


Don't forget to click the top arrow (promote).
Follow the steps as shown in the below graphic:


I know, I wish I could update my flexviewer but that would mean get my IT department involve again. I'm duplicating the folders for the flexviewer in my C: drive and them loading them using FileZilla to the webserver.
the first time it took almost a month for them to install it so until I can produce a flex map with all the capabilities i'm going to keep playing with flex.
Thank you so much for your help i'm going to copy the code and see if it works.
0 Kudos
VeronicaMoore1
Emerging Contributor
Veronica,

   Not sure why you are using 2.3 when you could be using 3.0 but anyway... Here is what you need to add to the main config.xml

        <operationallayers>
            <layer label="City_voting_locations" type="feature" visible="true" alpha="1" mode="onDemand" url="http://services.arcgis.com/4B9WU9185SohZnyi/arcgis/rest/services/City_voting_locations/FeatureServer/0"/>
        </operationallayers>


Don't forget to click the top arrow (promote).
Follow the steps as shown in the below graphic:


I added the code and now I can see the layer but I can't identify. When I click on it I don't see the attributes. I'm I missing anything else?
0 Kudos