circle = new esri.geometry.Circle({center:clickedPt,geodesic: true,radius:parseInt($('#cmbBuffer').combobox('getText')),radiusUnit: strUnit});
query = new esri.tasks.Query();
query.returnGeometry = true;
query.outFields = ["*"];
query.geometry = circle.getExtent();
//query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_CONTAINS;
queryTask.execute(query,selectInBuffer1);
the above code i am using to draw a circle and then get the feature from inside the buffer.It returns me some points.Some are inside and some are out side.i dont want point outside from buffer.what can be the reason.i am using bing map as a base map.that can one of the reason might be.please help.the result map is attached.
thanks in advance.
Solved! Go to Solution.
Nadir,
Your query geometry is the circles extent thus the points outside the circle. You should be using the circles extent for speed, but then you have to get the results of the query and look though then and use the circle.contains(points
Nadir,
Your query geometry is the circles extent thus the points outside the circle. You should be using the circles extent for speed, but then you have to get the results of the query and look though then and use the circle.contains(points