Select to view content in your preferred language

Adding layers from ArcGIS Server to ArcGIS Viewer for Flex

1324
3
08-09-2010 09:07 PM
StephenLead
Honored Contributor
I'm new to the ArcGIS Viewer for Flex, and I'm finding the help system a bit confusing.

I've installed the sample viewer and it's working fine. The Getting Started page at  http://help.arcgis.com/en/webapps/flexviewer/help/index.html contains  some simple parameter tweaks like changing the starting map extent -  this works fine too.

My question is where to obtain information on parameters like basemaps and operational layers.

Eg, where can I find detailed information on how to specify a new mapservice? The included map services use type="tiled" and alpha="1" - where are these listed, so I can find out what they mean, and how to change them?

Does the viewer automatically convert all layers into the same coordinate system? If not, how can I specify the coordinate system to use?

I guess I'm finding this confusing because the Sample gallery contains working examples but not much in the way of detailed code.

Thanks for any advice,
Steve
Tags (2)
0 Kudos
3 Replies
DerekLaw
Esri Esteemed Contributor
Hi Stephen,

... My question is where to obtain information on parameters like basemaps and operational layers.

Eg, where can I find detailed information on how to specify a new mapservice? The included map services use type="tiled" and alpha="1" - where are these listed, so I can find out what they mean, and how to change them? ...


The ArcGIS Viewer for Flex help documentation is also in beta and still being worked on. Robert Scheitlin posted a great explanation of the <mapservice> tag's attributes in this thread (see post #2):

Clear Instructions to add map services to Flexviewer 2.0 Please

... Does the viewer automatically convert all layers into the same coordinate system? If not, how can I specify the coordinate system to use? ...


No, the Viewer does not re-project layers into the same coordinate system. The layers should all have the same coordinate system. You can specify the spatial reference property in the <map> tag of the main Viewer configuration file (e.g., config.xml) using the Well Known ID (a.k.a. wkid) attribute.

We will work on improving the ArcGIS Viewer for Flex help documentation.

Hope this helps,
0 Kudos
StephenLead
Honored Contributor
Hi Derek,

Thanks very much for the info. Ideally it would be great if the help file for the Viewer followed the same format as the Silverlight page at http://help.arcgis.com/en/webapi/silverlight/samples/start.htm (whereby there's a working sample plus raw code for every sample).

Another quick question is how to build an Identify tool. The installable sample includes files like IWT_311.xml in the InfoTemplates folder.

How would I actually implement these files? eg, the IWT_311.xml file doesn't mention a layer, so presumably there's a layer definition somewhere, to tell this tool which layer to use. Can you please point me in the right direction here?

Thanks,
Steve
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Stephen,

   Look at the config-all.xml then the operationallayers you will see how these files are intended to be used.

<layer label="Fires" type="feature" visible="false" alpha="1"
                   info="widgets/InfoTemplates/SimpleInfoWinWidget.swf"
                   infoconfig="widgets/InfoTemplates/IWT_Fires.xml"
                   url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"/>
0 Kudos