<?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 GetFeatureInfo on a WMS layer returns the incorrect values in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getfeatureinfo-on-a-wms-layer-returns-the/m-p/50816#M4468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've added a WMS layer to a Web Mercator map, using the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;new esri.layers.WMSLayer()&lt;/SPAN&gt;&lt;SPAN&gt; method, and now I'm attempting to set up an Identify function to return the WMS layer's values when the user clicks on the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm running a GetFeatureInfo request using the current map extent (in Web Mercator) and the location clicked. This works correctly if I click in the middle of a polygon - but in many cases the returned value is incorrect, and represents an adjacent polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See the sample page &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://stephenlead.com/maps/wms/getFeatureInfo2.html" rel="nofollow" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt; - if you click on the "C" of "Clamgoose Lane" the returned value is the &lt;/SPAN&gt;&lt;STRONG&gt;011C &lt;/STRONG&gt;&lt;SPAN&gt;polygon, when the correct value should be &lt;/SPAN&gt;&lt;STRONG&gt;010B&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Firebug shows the GetMap request is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;BBOX=-224655.00820762033,6981963.631850611,-220642.0642225429,6984051.318185706&lt;BR /&gt;CRS=EPSG:102100&lt;BR /&gt;FORMAT=image/png&lt;BR /&gt;HEIGHT=874&lt;BR /&gt;LAYERS=0&lt;BR /&gt;REQUEST=GetMap&lt;BR /&gt;SERVICE=WMS&lt;BR /&gt;STYLES=&lt;BR /&gt;TRANSPARENT=TRUE&lt;BR /&gt;VERSION=1.3.0&lt;BR /&gt;WIDTH=1680&lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while the GetFeatureInfo request is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;BBOX=-224655.00820762033,6981963.631850611,-220642.0642225429,6984051.318185706&lt;BR /&gt;BGCOLOR=0xFFFFFF&lt;BR /&gt;FORMAT=text/xml&lt;BR /&gt;HEIGHT=874&lt;BR /&gt;LAYERS=0&lt;BR /&gt;QUERY_LAYERS=0&lt;BR /&gt;REQUEST=GetFeatureInfo&lt;BR /&gt;SERVICE=WMS&lt;BR /&gt;SRS=EPSG:102100&lt;BR /&gt;STYLES=&lt;BR /&gt;TRANSPARENT=TRUE&lt;BR /&gt;VERSION=1.1.1&lt;BR /&gt;WIDTH=1680&lt;BR /&gt;X=640&lt;BR /&gt;Y=431&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://mapping.statistics.gov.uk/arcgis/services/LSOA/LSOA_2011_EW_BFC/MapServer/WMSServer?=" rel="nofollow" target="_blank"&gt;https://mapping.statistics.gov.uk/arcgis/services/LSOA/LSOA_2011_EW_BFC/MapServer/WMSServer?=&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed that the version (1.3.0 vs 1.1.1) and the spatial reference (CRS vs SRS) differs between the requests, but when I try using the 1.3.0 syntax on the GetFeatureInfo request, I get an error message saying that the format is invalid. &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost/jsapi/wms/map_proxy.php?https://mapping.statistics.gov.uk/arcgis/services/LSOA/LSOA_2011_EW_BFC/MapServer/WMSServer?&amp;amp;REQUEST=GetFeatureInfo&amp;amp;SERVICE=WMS&amp;amp;VERSION=1.3.0&amp;amp;LAYERS=0&amp;amp;STYLES=&amp;amp;FORMAT=text%2Fxml&amp;amp;BGCOLOR=0xFFFFFF&amp;amp;TRANSPARENT=TRUE&amp;amp;CRS=EPSG%3A102100&amp;amp;BBOX=-224655.00820762033%2C6981963.631850611%2C-220642.0642225429%2C6984051.318185706&amp;amp;WIDTH=1680&amp;amp;HEIGHT=874&amp;amp;QUERY_LAYERS=0&amp;amp;X=640&amp;amp;Y=431" rel="nofollow" target="_blank"&gt;Here is the request &lt;/A&gt;&lt;SPAN&gt;that I'm trying, and the response:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Parameter 'InfoFormat' contains unacceptable value.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the correct syntax for a GetFeatureInfo request using version 1.3.0? Why would the result be slightly inaccurate, ie showing the adjacent polygon? It's almost like there's a datum shift?&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>Fri, 23 Aug 2013 06:29:47 GMT</pubDate>
    <dc:creator>StephenLead</dc:creator>
    <dc:date>2013-08-23T06:29:47Z</dc:date>
    <item>
      <title>GetFeatureInfo on a WMS layer returns the incorrect values</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getfeatureinfo-on-a-wms-layer-returns-the/m-p/50816#M4468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've added a WMS layer to a Web Mercator map, using the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;new esri.layers.WMSLayer()&lt;/SPAN&gt;&lt;SPAN&gt; method, and now I'm attempting to set up an Identify function to return the WMS layer's values when the user clicks on the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm running a GetFeatureInfo request using the current map extent (in Web Mercator) and the location clicked. This works correctly if I click in the middle of a polygon - but in many cases the returned value is incorrect, and represents an adjacent polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See the sample page &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://stephenlead.com/maps/wms/getFeatureInfo2.html" rel="nofollow" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt; - if you click on the "C" of "Clamgoose Lane" the returned value is the &lt;/SPAN&gt;&lt;STRONG&gt;011C &lt;/STRONG&gt;&lt;SPAN&gt;polygon, when the correct value should be &lt;/SPAN&gt;&lt;STRONG&gt;010B&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Firebug shows the GetMap request is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;BBOX=-224655.00820762033,6981963.631850611,-220642.0642225429,6984051.318185706&lt;BR /&gt;CRS=EPSG:102100&lt;BR /&gt;FORMAT=image/png&lt;BR /&gt;HEIGHT=874&lt;BR /&gt;LAYERS=0&lt;BR /&gt;REQUEST=GetMap&lt;BR /&gt;SERVICE=WMS&lt;BR /&gt;STYLES=&lt;BR /&gt;TRANSPARENT=TRUE&lt;BR /&gt;VERSION=1.3.0&lt;BR /&gt;WIDTH=1680&lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while the GetFeatureInfo request is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;BBOX=-224655.00820762033,6981963.631850611,-220642.0642225429,6984051.318185706&lt;BR /&gt;BGCOLOR=0xFFFFFF&lt;BR /&gt;FORMAT=text/xml&lt;BR /&gt;HEIGHT=874&lt;BR /&gt;LAYERS=0&lt;BR /&gt;QUERY_LAYERS=0&lt;BR /&gt;REQUEST=GetFeatureInfo&lt;BR /&gt;SERVICE=WMS&lt;BR /&gt;SRS=EPSG:102100&lt;BR /&gt;STYLES=&lt;BR /&gt;TRANSPARENT=TRUE&lt;BR /&gt;VERSION=1.1.1&lt;BR /&gt;WIDTH=1680&lt;BR /&gt;X=640&lt;BR /&gt;Y=431&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://mapping.statistics.gov.uk/arcgis/services/LSOA/LSOA_2011_EW_BFC/MapServer/WMSServer?=" rel="nofollow" target="_blank"&gt;https://mapping.statistics.gov.uk/arcgis/services/LSOA/LSOA_2011_EW_BFC/MapServer/WMSServer?=&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed that the version (1.3.0 vs 1.1.1) and the spatial reference (CRS vs SRS) differs between the requests, but when I try using the 1.3.0 syntax on the GetFeatureInfo request, I get an error message saying that the format is invalid. &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost/jsapi/wms/map_proxy.php?https://mapping.statistics.gov.uk/arcgis/services/LSOA/LSOA_2011_EW_BFC/MapServer/WMSServer?&amp;amp;REQUEST=GetFeatureInfo&amp;amp;SERVICE=WMS&amp;amp;VERSION=1.3.0&amp;amp;LAYERS=0&amp;amp;STYLES=&amp;amp;FORMAT=text%2Fxml&amp;amp;BGCOLOR=0xFFFFFF&amp;amp;TRANSPARENT=TRUE&amp;amp;CRS=EPSG%3A102100&amp;amp;BBOX=-224655.00820762033%2C6981963.631850611%2C-220642.0642225429%2C6984051.318185706&amp;amp;WIDTH=1680&amp;amp;HEIGHT=874&amp;amp;QUERY_LAYERS=0&amp;amp;X=640&amp;amp;Y=431" rel="nofollow" target="_blank"&gt;Here is the request &lt;/A&gt;&lt;SPAN&gt;that I'm trying, and the response:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Parameter 'InfoFormat' contains unacceptable value.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the correct syntax for a GetFeatureInfo request using version 1.3.0? Why would the result be slightly inaccurate, ie showing the adjacent polygon? It's almost like there's a datum shift?&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>Fri, 23 Aug 2013 06:29:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getfeatureinfo-on-a-wms-layer-returns-the/m-p/50816#M4468</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2013-08-23T06:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: GetFeatureInfo on a WMS layer returns the incorrect values</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getfeatureinfo-on-a-wms-layer-returns-the/m-p/50817#M4469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The answer to the first problem came via some help from GIS.StackExchange user &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://gis.stackexchange.com/users/14927/oyvind" rel="nofollow" target="_blank"&gt;oyvind&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was sending the XY location for the GetFeatureInfo using evt.screenX and evt.screenY. This was subtly different from evt.screenPoint.x and evt.screenPoint.y&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Aug 2013 07:58:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getfeatureinfo-on-a-wms-layer-returns-the/m-p/50817#M4469</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2013-08-24T07:58:22Z</dc:date>
    </item>
  </channel>
</rss>

