<?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 WMSLayer - How to access additional parameters from server? in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wmslayer-how-to-access-additional-parameters-from/m-p/293401#M6964</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After being disappointed with early WMS implementations in ESRI API I was happy to see the addition of a WMSLayer in 2.1/2.2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, I've been using the example: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=WMS_TOC" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=WMS_TOC&lt;/A&gt;&lt;SPAN&gt; as the basis for my initial work against our own WMS servers which serve imagery of weather information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm able to get the default WMS layer back for each Layer from each Service our WMS provides. However, I'm unable to access the additional parameters our WMS provides and allows for selection. E.g. one layer returns a list of date/times for data and in your request you can add this date/time to get that specific image back. I'll include a grab of some of the returned XML from the GetCapabilities call below&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I'm sure WMSLayer was designed to work against ArcGIS servers rather than other vendor's WMS servers but surely it isn't a big stretch to get there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could anybody advise on how to get there? I'm currently so close, but so far... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ian&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;----------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;Layer queryable="1"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;NOW_Visibility&amp;lt;/Name&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Scaled Visibility&amp;lt;/Title&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SRS&amp;gt;CRS:84&amp;lt;/SRS&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SRS&amp;gt;EPSG:4326&amp;lt;/SRS&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LatLonBoundingBox minx="-180" miny="-90" maxx="180" maxy="90"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;BoundingBox SRS="CRS:84" minx="-180" miny="-90" maxx="180" maxy="90"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;BoundingBox SRS="EPSG:4326" minx="-180" miny="-90" maxx="180" maxy="90"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Dimension name="DIM_RUN" units="ISO8601"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Dimension name="DIM_FORECAST" units="ISO8601"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Extent name="DIM_RUN" default="2011-02-10T11:00:00"&amp;gt;2011-02-10T10:00:00,2011-02-10T11:00:00&amp;lt;/Extent&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Extent name="DIM_FORECAST" default="+0"&amp;gt;+0,+1,+2,+3,+4,+5,+6&amp;lt;/Extent&amp;gt;
&amp;lt;/Layer&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 14:06:50 GMT</pubDate>
    <dc:creator>IanWatkins</dc:creator>
    <dc:date>2021-12-11T14:06:50Z</dc:date>
    <item>
      <title>WMSLayer - How to access additional parameters from server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wmslayer-how-to-access-additional-parameters-from/m-p/293401#M6964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After being disappointed with early WMS implementations in ESRI API I was happy to see the addition of a WMSLayer in 2.1/2.2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, I've been using the example: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=WMS_TOC" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=WMS_TOC&lt;/A&gt;&lt;SPAN&gt; as the basis for my initial work against our own WMS servers which serve imagery of weather information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm able to get the default WMS layer back for each Layer from each Service our WMS provides. However, I'm unable to access the additional parameters our WMS provides and allows for selection. E.g. one layer returns a list of date/times for data and in your request you can add this date/time to get that specific image back. I'll include a grab of some of the returned XML from the GetCapabilities call below&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I'm sure WMSLayer was designed to work against ArcGIS servers rather than other vendor's WMS servers but surely it isn't a big stretch to get there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could anybody advise on how to get there? I'm currently so close, but so far... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ian&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;----------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;Layer queryable="1"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;NOW_Visibility&amp;lt;/Name&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Scaled Visibility&amp;lt;/Title&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SRS&amp;gt;CRS:84&amp;lt;/SRS&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SRS&amp;gt;EPSG:4326&amp;lt;/SRS&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LatLonBoundingBox minx="-180" miny="-90" maxx="180" maxy="90"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;BoundingBox SRS="CRS:84" minx="-180" miny="-90" maxx="180" maxy="90"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;BoundingBox SRS="EPSG:4326" minx="-180" miny="-90" maxx="180" maxy="90"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Dimension name="DIM_RUN" units="ISO8601"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Dimension name="DIM_FORECAST" units="ISO8601"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Extent name="DIM_RUN" default="2011-02-10T11:00:00"&amp;gt;2011-02-10T10:00:00,2011-02-10T11:00:00&amp;lt;/Extent&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Extent name="DIM_FORECAST" default="+0"&amp;gt;+0,+1,+2,+3,+4,+5,+6&amp;lt;/Extent&amp;gt;
&amp;lt;/Layer&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:06:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wmslayer-how-to-access-additional-parameters-from/m-p/293401#M6964</guid>
      <dc:creator>IanWatkins</dc:creator>
      <dc:date>2021-12-11T14:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: WMSLayer - How to access additional parameters from server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wmslayer-how-to-access-additional-parameters-from/m-p/293402#M6965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One option may be to add the extra parameters to the url you set on the WMSLayer since extra params are passed on in the requests the WMSLayer makes to the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?foo=bar"&gt;http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?foo=bar&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 19:50:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wmslayer-how-to-access-additional-parameters-from/m-p/293402#M6965</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2011-02-10T19:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: WMSLayer - How to access additional parameters from server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wmslayer-how-to-access-additional-parameters-from/m-p/293403#M6966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;One option may be to add the extra parameters to the url you set on the WMSLayer since extra params are passed on in the requests the WMSLayer makes to the server.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?foo=bar"&gt;http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?foo=bar&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Dasa,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That would work, but would need to know the possible values for "foo" from the GetCapabilities before I presented them to the user to choose one value before adding it to the url for the WMSLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess the answer is "not right now" with regards to the WMSLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I think I have a plan:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Set up the WMSLayer as normal but use "skipCapabilites=true"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Use a HTTPService call to get the XML back from GetCapabilities for the selected service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Parse that to get the available values back for "foo"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Allow the user to select the value of "foo" they want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5. Add that to the URL for WMSLayer as you suggest and trigger it to get the WMS imagery back from the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Probably not ideal, but would work I think. I'll give it a go over the weekend.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-----------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess what I would like to see is for WMSLayer to be extended to allow access to all the information in the returned GetCapabilities for a layer. This way all additional parameters would be accessible in one hit. So as in the example, name and title for the layer would be able to be added directly to a datagrid for selection but also so would other parameters be they 1, 2 or 3 dimensional. (e.g. in our case, data over time and data over elevations)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And extension to that would be to allow one of those parameters to be associated with a TimeSlider much like you would with a FeatureLayer etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any chance those two possibilities could be fed back to the ideas guys please? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 14:07:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wmslayer-how-to-access-additional-parameters-from/m-p/293403#M6966</guid>
      <dc:creator>IanWatkins</dc:creator>
      <dc:date>2011-02-11T14:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: WMSLayer - How to access additional parameters from server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/wmslayer-how-to-access-additional-parameters-from/m-p/293404#M6967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bumping this request; maybe I can also post it on the Esri Ideas website.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like I will have to follow iwatkins's approach in order to get the Dimension tags from a WMS Layer.&amp;nbsp; I agree it feels inefficient since I am essentially getting the GetCapabilities twice, once for the WMSLayer object and again as an XML object for my own parsing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the reference for WMSLayerInfo:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/supportClasses/WMSLayerInfo.html"&gt;http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/supportClasses/WMSLayerInfo.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would love to see additional properties in the future, perhaps one called "dimension" which would be an array of WMSDimension objects containing the name, units, and the value of the dimension.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2012 15:23:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/wmslayer-how-to-access-additional-parameters-from/m-p/293404#M6967</guid>
      <dc:creator>HarryLam</dc:creator>
      <dc:date>2012-04-23T15:23:41Z</dc:date>
    </item>
  </channel>
</rss>

