Steve - I have no working examples of a WMS identify task. If you are speaking specifically about the FEMA WMS service, you might want to check and make sure their service supports identify queries - I dont think it does.There are a couple of other items about working this FEMA service and the WMSLayer class I would like to mention.First, the WMSLayer class by default does not expose any image height or width properties. The height and width is set automatically by the map.height and map.width properties. This is a problem with the FEMA service because they do not allow images larger than 1024 x 1024. So, if you map height and width is greater than 1024, you will not get an image returned from the server. I talked to ESRI tech support, and the tech mentioned the WMSLayer class is meant to be used with WMS layers created from ArcGIS Server. The tech pointed me to this forum post:http://forums.esri.com/Thread.asp?c=158&f=2421&t=296210That post describes extending the DynamicMapServiceLayer class. By extending this class, you can set properties for the height and width of the image returned from the WMS server. I extended the ESRI Flex 2.2 DynamicMapServiceLayer class, using the correct parameters, and it works.Note though that this extended class makes use of the URLVariables class. When using this class, the format of the URL parameters that are sent to the WMS service get all messed up and the request will fail, so I had to concatenate my own URL string and set the _urlRequest.data = to my URL string.Finally, the parameter for TRANSPARENT in the FEMA service is TRANPARENT (notice the lack of an S). Took me about on hour to figure that one out.Here is the code I used to extend the 2.2 DynamicMapServiceLayer :package com.esri.ags.samples
{
import com.esri.ags.SpatialReference;
import com.esri.ags.Units;
import com.esri.ags.geometry.Extent;
import com.esri.ags.layers.DynamicMapServiceLayer;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.net.URLVariables;
/**
* WMSLayer
*/
public class WMSLayer extends DynamicMapServiceLayer
{
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Creates a new WMSLayer object.
*/
public function WMSLayer()
{
super();
setLoaded(true); // Map will only use loaded layers
// init constant parameter values
_params = new URLVariables();
_params.REQUEST = "GetMap";
_params.TRANPARENT = "true";
_params.FORMAT = "image/png";
_params.VERSION = "1.1.1";
_params.LAYERS = "Flood_Hazard_Zones_General";
_params.STYLES = "";
_params.SERVICE = "WMS";
_params.SERVICENAME = "WMS";
var url:String = "http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/NFHL";
// var url:String = "http://demo.cubewerx.com/demo/cubeserv/cubeserv.cgi?";
_urlRequest = new URLRequest(url);
//_urlRequest.data = _params; // set params on URLRequest object
}
//--------------------------------------------------------------------------
//
// Variables
//
//--------------------------------------------------------------------------
private var _params:URLVariables;
private var _urlRequest:URLRequest;
//--------------------------------------------------------------------------
//
// Overridden properties
// initialExtent()
// spatialReference()
// units()
//
//--------------------------------------------------------------------------
//----------------------------------
// initialExtent
// - needed if Map doesn't have an extent
//----------------------------------
override public function get initialExtent():Extent
{
return new Extent(-105.261295716 ,39.467332551,-104.545150425 ,40.065272394, new SpatialReference(4326));
}
//----------------------------------
// spatialReference
// - needed if Map doesn't have a spatialReference
//----------------------------------
override public function get spatialReference():SpatialReference
{
return new SpatialReference(4326);
}
//----------------------------------
// units
// - needed if Map doesn't have it set
//----------------------------------
override public function get units():String
{
return Units.DECIMAL_DEGREES;
}
//--------------------------------------------------------------------------
//
// Overridden methods
// loadMapImage(loader:Loader):void
//
//--------------------------------------------------------------------------
override protected function loadMapImage(loader:Loader):void
{
// update changing values
_params.BBOX = map.extent.xmin.toString() + "," + map.extent.ymin.toString() + "," + map.extent.xmax.toString() + "," + map.extent.ymax.toString() ;
_params.SRS = "EPSG:4326";
// _params.WIDTH = map.width;
// _params.HEIGHT = map.height;
//for the FEMA WMS layer, the max size they allow is 1024x1024
_params.WIDTH = 1024;
_params.HEIGHT = 1024;
/* We have to format our URL parameters as a string because the the bounding box parameters will get messed up if we don't */
var urlParams:String;
urlParams = "FORMAT=" + _params.FORMAT + "&" + "HEIGHT=" + _params.HEIGHT + "&" + "BBOX=" + _params.BBOX + "&" + "WIDTH=" + _params.WIDTH + "&" + "LAYERS=" + _params.LAYERS + "&" + "SRS=" + _params.SRS +
"&" + "VERSION=" + _params.VERSION + "&" + "STYLES=" + _params.STYLES + "&" + "REQUEST=" + _params.REQUEST + "&" + "SERVICE=" + _params.SERVICE + "&" + "TRANPARENT=" + _params.TRANPARENT +
"&" + "SERVICENAME=" + _params.SERVICENAME;
_urlRequest.data = urlParams;
loader.load(_urlRequest);
}
}
}