AnsweredAssumed Answered

intersect grids count is not matching

Question asked by veena@hosur on Sep 20, 2016
Latest reply on Sep 20, 2016 by rscheitlin

function loadSearch(districtname) {
queryTask = new esri.tasks.QueryTask("http://************/arcgis/rest/services/DEMO/KGISV1/MapServer/2");
query = new esri.tasks.Query();
query.where = "DistrictName = '" + districtname + "'";
query.returnGeometry = true;
//query.geometryPrecision = 1;
queryTask.execute(query);
dojo.connect(queryTask, "onComplete", zoomToZip);
// dojo.connect(queryTask, "onComplete", zoomToZip2);
// dojo.connect(queryTask, "onComplete", zoomToZip3);
}

function zoomToZip(featureSet) {
var polygon = featureSet.features[0].geometry;
// populate the Geometry cache by calling getExtent()
//var polygon
//for (var i = 0; i < featureSet.features.length; i++) {

// polygon=featureSet.features[i]
//}
//alert(polygon.geometry.type);
var polygonExtent = polygon.getExtent();

alert(polygonExtent);
queryTask2 = new esri.tasks.QueryTask("http://************/arcgis/rest/services/DEMO/GraticulesV1/MapServer/0");
query2 = new esri.tasks.Query();
query2.geometry = polygonExtent;
query2.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS;
query2.returnGeometry = true;
query2.outFields = ["*"];
queryTask2.execute(query2);
dojo.connect(queryTask2, "onComplete", selectTracts);
}

 

from first query i am getting extent of district .this geometry i am passing to second query.i am getting the output but intersected grids count is more compared to arcmap desktop.can any one tell me what is the problem

Outcomes