I am trying to query against this public feature service (point geometry): http://services2.arcgis.com/Gypl21NmiWS1cM7h/ArcGIS/rest/services/TrafficCounts/FeatureServer/0
When I input the exact coordinates for a station, that station is returned:
But if I add 2000 to the 'distance' parameter, I get no results:
I've tried this with WKID 102100 as well. Same behavior. There are other stations within 2000 meters of that station, as shown below. Any idea what is causing this?
Solved! Go to Solution.
Try changing your Spatial Relationship from Within to Intersects
Try changing your Spatial Relationship from Within to Intersects
That did the trick. I was thinking that the "within" spatial relationship option that maps to esriSpatialRelWithin meant "are within distance of" like the option in the "Select by location" dialog in ArcMap. As did one of my co-workers. If any ESRI folks read this, consider changing "within" to "contained within" on the HTML form. I realize that changing esriSpatialRelWithin to something else will break code all over the world and is therefore infeasible.