AnsweredAssumed Answered

REST Radius Spatial Query

Question asked by scott@er on Dec 17, 2019
Latest reply on Jan 6, 2020 by scott@er

Hi, i have created some code which does the following:

1) user clicks on the map (red pin)

2) a circle is created, based on the point in step 1, and queries the feature layer for items within the radius (50 meters (?))

3) results are displayed on map (blue pins)

var x = e.mapPoint.x;
var y = e.mapPoint.y;
var spatial = new SpatialReference({ wkid: 102100, latestWkid: 3857 });
var point = new Point(x, y, spatial);

qGeom = new Circle(point,{
  "radius": 50,

// use the circle for the query geometry
qParcels.geometry = qGeom;
qParcels.outFields = ["UFRM_BLPU_POINT_ADDRESS"];
qParcels.returnGeometry = true;
parcels = queryTask.execute(qParcels, showResults);





Ok, so all of the above works perfectly client side using the jsapi 3.29.


I now want to take the above functionality and replicate it in the Query Builder.  I've used Chrome developer tools to try and mimic the request, but i don't have the full picture.


Here is what i have so far.  I'm getting an error when setting the Geometry to 'esriGeometryPolygon' 'geometry' parameter is invalid (I assume esriGeometryPolygon is what i should be using as that's what i located in dev tools).  I'm also not sure how i set the circle.


Can someone help me with the combination of settings?