Select to view content in your preferred language

WMS Problem with Flex 2.2 and WMSLayer Class

1969
12
03-16-2011 07:02 AM
BrianBehling
Deactivated User
Hello.

I am trying to add a FEMA WMS flood hazard layer to a Flex application using the WMSLayer class, but it appears something is wrong with this class.

I verified the WMS service is working ArcMap. Since FEMA does not have a crossdomain file on their servers, I have to use a proxy page. I verified the proxy page is working in Visual Studio. When I use Fiddler to check the response from FEMA's server, it tells me that the SRS parameter is not defined. The spatialReference property for this class is read only, so there is no way to specify what the SRS parameter is. I did notice in the URL string that the CRS is getting set.

Anyone know if this is a bug or if I will have to use the 1.3 method of getting a WMS service into my application since I can't set the SRS parameter? Simple test code I'm using below:

<esri:Map id="map1"  scaleBarVisible="false"  logoVisible="false" load="onLoad()" >
  
<esri:ArcGISDynamicMapServiceLayer url="http://localhost/ArcGIS/rest/services/testWMS  /MapServer"/>
<esri:WMSLayer id="floodplain2" imageFormat="png" url="http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/NFHL" skipGetCapabilities="false"  disableClientCaching="false" proxyURL="http://localhost/test/proxy.ashx"  >
<esri:visibleLayers>
   <mx:ArrayList>
      <fx:String>Flood_Hazard_Zones_General</fx:String>
  </mx:ArrayList>
    </esri:visibleLayers>
</esri:WMSLayer>
</esri:Map>
Tags (2)
0 Kudos
12 Replies
DasaPaddock
Esri Regular Contributor
It is best to connect directly to the WMS service from the Flex client rather than connecting through an ArcGIS Server map service.
0 Kudos
BrianBehling
Deactivated User
Per Dasa's comment, read about Cascading Map Services


http://support.esri.com/en/knowledgebase/techarticles/detail/35903
0 Kudos
eddiequinlan
Deactivated User
Thank you both,

I suspected, but could find the info, that re-publishing the WMS was not the prefered or efficient method.

Thanx,
Eddie
0 Kudos