I have added a WMS layer to the ArcGIS Server JSAPI and am attempting to query it using
getFeatureInfo when the user clicks on the map.
This is mostly working, except that the accuracy of the results is very suspicious. If I click within a few hundred metres of a polygon boundary, I often get back the neighbouring polygon's results:
In this case I have clicked within Staffordshire Moorlands 010B (as shown by the infoWindow's anchor) but the result shows the neighbouring polygon 011C.
In order to run the
getFeatureInfo, I am calculating the map extent in its native web mercator, converting this into the units of the WMS layer, and using this as the bounding box.
Is this a valid approach?
The question ArcGIS Server WMS GetFeatureInfo tolerance implies that there may be some trickery required to get the tolerance right?