[GIS] Using URL parameters in ArcGIS Server Viewer for Flex

arcgis-flex-viewerarcgis-serverparameters

Can you use URL parameters in ArcGIS Server 10 Viewer for Flex to turn on layers?

I have had success using URL parameters to go to specific coordinates.

Best Answer

No, the compiled version of ArcGIS Viewer for Flex does not directly support using URL parameters to turn on/off layers.
http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Viewer_URL_parameters/01m300000029000000/

However, you can use URL parameters to point the application to different configuration files, and inside the configuration files you can specify particular map services, layers, etc. http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Main_configuration_file/01m300000018000000/

To set the visibility for specific layers within a mapservice (overriding the map service visibilities), use the visiblelayers property on the layer tag. For example:

<layer visiblelayer="0,2" .../>

visiblelayers - Which sublayers to show when the application first opens. The default is as specified on the server. Only applies to dynamic, arcims and wms. For WMS it is required or no sublayers will be shown.

http://help.arcgis.com/en/webapps/flexviewer/help/index.html#//01m30000000p000000.htm