[GIS] Adding operational layers to ArcGIS Viewer for Flex

arcgis-flex-viewerarcgis-servermap-service

I am new to Flex Viewer and am currently trying to view my Map Service that comes from remote Arc GIS Server over the Internet. All parameters in the config.xml file are set up as default (I made no changes to the original file) and I am trying to add a new operational layer. I have installed (locally) Apache 2.2 as my local web server and Flexviewer v 2.3.1. I am therefore using the Flexviewer through my localhost.

My map service using a single feature class, file geodatabase with the data and mxd data frame set to WGS_1984_Web_Mercator_Auxiliary_Sphere, to be consistent with the basemap layers from arcgis online.

I haven't got the ability to install flex viewer on the actual ArcGIS service (in a different office) but I have access via ArcCatalog and ArcGIS Server Manager.

I assume the problem is either

  1. the URL structure specifying the map service, or
  2. some issue with that fact that I'm using a remote ArcGIS Server map serivce?

Below is the code used in config.xml specifying my map service. Is this correct?

    <operationallayers>
        <layer label="test" type="feature" visible="true"
               url="http://myserver/arcgis/rest/services/myservice_wgs84wm/MapServer/"
    </operationallayers>   ,

where 'myservice_wgs84wm' is the name of my map service, served from my ArcGIS Server (named above as 'myserver').

Can anyone advise on the structure of my URL? Do I need to include 'REST' parameter – I don't really understand this?

I'm going to post cross post on the http://forums.arcgis.com/

Best Answer

from your configuration of the layer, it seems there lost the ">" for the tag "layer". it should be as follows:

<operationallayers>
    <layer label="test" type="feature" visible="true"
           url="http://myserver/arcgis/rest/services/myservice_wgs84wm/MapServer/" />
</operationallayers> 
Related Question