[GIS] How to display dynamic map service in ESRI Flex Application

arcgis-serverflex

I am working with ESRI's sample Flex viewer, and am having an issue with displaying our dynamic map service. I found this question on the site, but it hasn't helped me with my issue, so I thought I would try the question in a different form. I have added the url for my service to the operational layers tag in the config file, but the service does not display in the application. The code is below. My dynamic map service is in NAD 83. From what I've read I should be able to display a dynamic map service on top of a tiled map service, as long as the tiled base layer is the first layer loaded in the map. I guess my main question is what am I missing?

<map initialextent="-8936000 4149000 -8751000 4256000" wkid="102113" top="40">
    <basemaps>
        <layer label="Streets" type="tiled" visible="true"  alpha="1"
                    url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
        <layer label="Aerial"  type="tiled" visible="false" alpha="1"
                    url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
        <layer label="Topo"    type="tiled" visible="false" alpha="1"
                    url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>

    </basemaps>
    <operationallayers>
        <layer label="Moore" type="dynamic" visible="true"  alpha="1"
                            url="http://servername/ArcGIS/rest/services/test_map/MapServer"/>
        <layer label="Boundaries and Places" type="tiled" visible="false"
               url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer"/>
    </operationallayers>
</map>

Best Answer

I suspect you are missing a cross domain policy file - a requirement if your viewer and maps are hosted on different servers.

See the ESRI documentation for more details on the cross domain policy.

Also, using a web traffic tool like Fiddler or Firebug can help a lot to determine why you don't see your map. It will answer questions such as "is my map really being requested?" and "is the map image returned actually in the right place?" and "is something else being drawn on top by mistake?"

Related Question