<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WMS Problem with Flex 2.2 and WMSLayer Class in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477787#M10910</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Per Dasa's comment, read about Cascading Map Services&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/35903"&gt;http://support.esri.com/en/knowledgebase/techarticles/detail/35903&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jan 2013 19:25:49 GMT</pubDate>
    <dc:creator>BrianBehling</dc:creator>
    <dc:date>2013-01-25T19:25:49Z</dc:date>
    <item>
      <title>WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477776#M10899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;esri:Map id="map1"&amp;nbsp; scaleBarVisible="false"&amp;nbsp; logoVisible="false" load="onLoad()" &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;lt;esri:ArcGISDynamicMapServiceLayer url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost/ArcGIS/rest/services/testWMS" rel="nofollow" target="_blank"&gt;http://localhost/ArcGIS/rest/services/testWMS&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; /MapServer"/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;lt;esri:WMSLayer id="floodplain2" imageFormat="png" url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/NFHL" rel="nofollow" target="_blank"&gt;http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/NFHL&lt;/A&gt;&lt;SPAN&gt;" skipGetCapabilities="false"&amp;nbsp; disableClientCaching="false" proxyURL="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost/test/proxy.ashx" rel="nofollow" target="_blank"&gt;http://localhost/test/proxy.ashx&lt;/A&gt;&lt;SPAN&gt;"&amp;nbsp; &amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esri:visibleLayers&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;lt;mx:ArrayList&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:String&amp;gt;Flood_Hazard_Zones_General&amp;lt;/fx:String&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/mx:ArrayList&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:visibleLayers&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/esri:WMSLayer&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/esri:Map&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 14:02:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477776#M10899</guid>
      <dc:creator>BrianBehling</dc:creator>
      <dc:date>2011-03-16T14:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477777#M10900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You don't actually need a proxy if you set skipGetCapabilities to true, but you do need to set the version to one that the service supports. Since you have skipGetCapabilities set to false, it should be getting the capabilities and using the right version already, but you can try setting skipGetCapabilities to true and removing the proxy and setting the version to 1.1.1.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 17:54:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477777#M10900</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2011-03-16T17:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477778#M10901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's a working example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Map width="1024" height="768"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:extent&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Extent xmin="-120" ymin="34.1" xmax="-119.3" ymax="34.6"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:SpatialReference wkid="4326"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Extent&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:extent&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer url="http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:WMSLayer skipGetCapabilities="true"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/NFHL"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; version="1.1.1"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:visibleLayers&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:ArrayList&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:String&amp;gt;Flood_Hazard_Zones_General&amp;lt;/fx:String&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/s:ArrayList&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:visibleLayers&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:WMSLayer&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Map&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:06:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477778#M10901</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2021-12-11T21:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477779#M10902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply. Nice. I didn't know I had to pass in the version. Too bad the error returned from FEMA's WMS service didn't specify that I had the incorrect version.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 21:42:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477779#M10902</guid>
      <dc:creator>BrianBehling</dc:creator>
      <dc:date>2011-03-16T21:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477780#M10903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Brian -thanks for this thread and Dasa thanks for the working example which also helped solve a problem I was having with WMSLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an additional question though. Is there a working example(s) of performing an identify on a WMSLayer ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Mar 2011 10:25:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477780#M10903</guid>
      <dc:creator>SteveTest</dc:creator>
      <dc:date>2011-03-20T10:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477781#M10904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steve - &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a couple of other items about working this FEMA service and the WMSLayer class I would like to mention.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2421&amp;amp;t=296210" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2421&amp;amp;t=296210&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That 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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code I used to extend the 2.2 DynamicMapServiceLayer :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;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
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; //--------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; //
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; Constructor
&amp;nbsp;&amp;nbsp;&amp;nbsp; //
&amp;nbsp;&amp;nbsp;&amp;nbsp; //--------------------------------------------------------------------------

&amp;nbsp;&amp;nbsp;&amp;nbsp; /**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Creates a new WMSLayer object.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */
&amp;nbsp;&amp;nbsp;&amp;nbsp; public function WMSLayer()
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setLoaded(true); // Map will only use loaded layers
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // init constant parameter values
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _params = new URLVariables();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _params.REQUEST = "GetMap";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _params.TRANPARENT = "true";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _params.FORMAT = "image/png";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _params.VERSION = "1.1.1";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _params.LAYERS = "Flood_Hazard_Zones_General";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _params.STYLES = "";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _params.SERVICE = "WMS";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _params.SERVICENAME = "WMS";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; var url:String = "http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/NFHL";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // var url:String = "http://demo.cubewerx.com/demo/cubeserv/cubeserv.cgi?";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _urlRequest = new URLRequest(url);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //_urlRequest.data = _params; // set params on URLRequest object
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; //--------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; //
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; Variables
&amp;nbsp;&amp;nbsp;&amp;nbsp; //
&amp;nbsp;&amp;nbsp;&amp;nbsp; //--------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; private var _params:URLVariables;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private var _urlRequest:URLRequest;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; //--------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; //
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; Overridden properties
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initialExtent()
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spatialReference()
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; units()
&amp;nbsp;&amp;nbsp;&amp;nbsp; //
&amp;nbsp;&amp;nbsp;&amp;nbsp; //--------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; initialExtent
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; - needed if Map doesn't have an extent
&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------

&amp;nbsp;&amp;nbsp;&amp;nbsp; override public function get initialExtent():Extent
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new Extent(-105.261295716 ,39.467332551,-104.545150425 ,40.065272394, new SpatialReference(4326));
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; spatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; - needed if Map doesn't have a spatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------

&amp;nbsp;&amp;nbsp;&amp;nbsp; override public function get spatialReference():SpatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new SpatialReference(4326);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; units
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; - needed if Map doesn't have it set
&amp;nbsp;&amp;nbsp;&amp;nbsp; //----------------------------------

&amp;nbsp;&amp;nbsp;&amp;nbsp; override public function get units():String
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return Units.DECIMAL_DEGREES;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; //--------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; //
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; Overridden methods
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loadMapImage(loader:Loader):void
&amp;nbsp;&amp;nbsp;&amp;nbsp; //
&amp;nbsp;&amp;nbsp;&amp;nbsp; //--------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; override protected function loadMapImage(loader:Loader):void
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // update changing values
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _params.BBOX =&amp;nbsp; map.extent.xmin.toString() + "," + map.extent.ymin.toString() + "," + map.extent.xmax.toString() + "," + map.extent.ymax.toString() ;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _params.SRS = "EPSG:4326";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // _params.WIDTH = map.width;
&amp;nbsp; // _params.HEIGHT = map.height;
&amp;nbsp; 
&amp;nbsp; //for the FEMA WMS layer, the max size they allow is 1024x1024
&amp;nbsp; _params.WIDTH = 1024;
&amp;nbsp; _params.HEIGHT = 1024;

&amp;nbsp; 
&amp;nbsp; /* We have to format our URL parameters as a string because the the bounding box parameters will get messed up if we don't */
&amp;nbsp; var urlParams:String;
&amp;nbsp; 
&amp;nbsp; urlParams = "FORMAT=" + _params.FORMAT + "&amp;amp;" + "HEIGHT=" + _params.HEIGHT + "&amp;amp;" + "BBOX=" + _params.BBOX + "&amp;amp;" + "WIDTH=" + _params.WIDTH + "&amp;amp;" + "LAYERS=" + _params.LAYERS + "&amp;amp;" + "SRS=" + _params.SRS + 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;amp;" + "VERSION=" + _params.VERSION + "&amp;amp;" + "STYLES=" + _params.STYLES + "&amp;amp;" + "REQUEST=" + _params.REQUEST + "&amp;amp;" + "SERVICE=" + _params.SERVICE + "&amp;amp;" + "TRANPARENT=" + _params.TRANPARENT +
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;amp;" + "SERVICENAME=" + _params.SERVICENAME;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; _urlRequest.data = urlParams;
&amp;nbsp; 
&amp;nbsp; loader.load(_urlRequest);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}

}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:06:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477781#M10904</guid>
      <dc:creator>BrianBehling</dc:creator>
      <dc:date>2021-12-11T21:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477782#M10905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Brian&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't have a current requirement for the FEMA services but thanks for those extra details - as they could crop up elsewhere. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I now have two approaches to incorporating WMS services both of which work fine so far for my data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. &amp;lt;esri:WMSLayer&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. extend DynamicMapServiceLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Getting these working was great progress for me!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All I need now is to solve the identify-WMS-feature problem.&amp;nbsp; :confused:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Mar 2011 18:22:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477782#M10905</guid>
      <dc:creator>SteveTest</dc:creator>
      <dc:date>2011-03-20T18:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477783#M10906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hopefully someone can enlighten me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm fundamentally struggling with the WMSLayer class.&amp;nbsp; My goal is to use my&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;var WMSurl = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0q-t.cgi" rel="nofollow" target="_blank"&gt;http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0q-t.cgi&lt;/A&gt;&lt;SPAN&gt;?" from Iowa State as an overlay on my map.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bringing this service into an ArcMap document is fairly simple.&amp;nbsp; I can see the map, properties, available layers, etc....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to implement the WMSLayer method mentioned above I keep getting a repeating error when I'm debugging the app.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Trace returns this...."[SWF] /cgi-bin/wms/nexrad/n0q-t.cgi - 0 bytes after decompression"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try the same method to connect to the FEMA WMS I get a similar error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Trace returns this...."[SWF] /wmsconnector/wmsconnector/Servlet/NFHL - 0 bytes after decompression".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So here are my questions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; Though I could publish a map service on my server using the WMS, is this the best practice?&amp;nbsp; Seems like alot of connections/maintainance/and trouble rather than connecting from my Flex app directly to the WMS service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; Is there a reason/advantage to connecting via "WMSLayer extends DynamicMapServiceLayer" method?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; When connecting to the layer are we connecting to a Layer or an actual Service?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also been testing this method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var nexrad:WMSLayer = new WMSLayer(WMSurl);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;nexrad.version = "1.3.0";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;nexrad.imageFormat = "png";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;nexrad.skipGetCapabilities = false; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myMap.addLayer(nexrad);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;nexrad.refresh();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This gives no error indications, but also does not display a Layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone get me over the hump?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanx,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eddie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 18:41:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477783#M10906</guid>
      <dc:creator>eddiequinlan</dc:creator>
      <dc:date>2013-01-25T18:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477784#M10907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to specify at least one visible layer. See this example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/18988-How-to-get-WMSLayer-to-work?p=60641&amp;amp;viewfull=1#post60641"&gt;http://forums.arcgis.com/threads/18988-How-to-get-WMSLayer-to-work?p=60641&amp;amp;viewfull=1#post60641&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 18:48:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477784#M10907</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2013-01-25T18:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477785#M10908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dasa,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the quick response.&amp;nbsp; Previously I did try adding the layer and got the same results.&amp;nbsp; However, I did notice in your previous post your url is&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;......wms/nexrad/n0r.cgi&amp;nbsp;&amp;nbsp;&amp;nbsp; and the layer is&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nexrad-n0r&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mine was ........wms/nexrad/n0q-t.cgi&amp;nbsp;&amp;nbsp;&amp;nbsp; and the layer was&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nexrad-n0r&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've made the changes and can now see a displayed layer.&amp;nbsp; I need to do some testing for various functionality, but you got me over the hill.........&amp;nbsp; thanx.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you enlighten me on the other questions?&amp;nbsp;&amp;nbsp; Should I approach adding this WMS layer via a .mxd published map service?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 18:57:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477785#M10908</guid>
      <dc:creator>eddiequinlan</dc:creator>
      <dc:date>2013-01-25T18:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477786#M10909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It is best to connect directly to the WMS service from the Flex client rather than connecting through an ArcGIS Server map service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 19:01:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477786#M10909</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2013-01-25T19:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477787#M10910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Per Dasa's comment, read about Cascading Map Services&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/35903"&gt;http://support.esri.com/en/knowledgebase/techarticles/detail/35903&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 19:25:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477787#M10910</guid>
      <dc:creator>BrianBehling</dc:creator>
      <dc:date>2013-01-25T19:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Problem with Flex 2.2 and WMSLayer Class</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477788#M10911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you both,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspected, but could find the info, that re-publishing the WMS was not the prefered or efficient method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanx,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eddie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 20:59:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wms-problem-with-flex-2-2-and-wmslayer-class/m-p/477788#M10911</guid>
      <dc:creator>eddiequinlan</dc:creator>
      <dc:date>2013-01-25T20:59:48Z</dc:date>
    </item>
  </channel>
</rss>

