AnsweredAssumed Answered

Intersect using the Geometry Service

Question asked by rvamshi on Aug 28, 2013
Latest reply on Sep 3, 2013 by rvamshi
For an intersect operation using the geometry service, below is my code thus far. Something is not right as the intersect is not working and the geometry(ies) is not returned. Could you please suggest where I am wrong. Thanks in advance for your help.


//perform intersect using geometry service function performIntersect(featureSet) { var geomService = new esri.tasks.GeometryService("");     var geomSet = [];     for (var i = 0; i < featureSet.length; i++) {         geomSet.push(featureSet[i].geometry);     }      //get geometry from the graphic drawn by user on map     var geomDraw = esri.getGeometries(;      //call the geometry intersect     geomService.intersect(geomSet, geomDraw, showIntersect);  //dont have an error handler, but runs through with no results }  //show the intersect geometries on map function showIntersect(intGeometries) {     var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,     new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0, 0.65]), 2), new dojo.Color([255, 0, 0, 0.35]));      dojo.forEach(intGeometries, function (geometry) {         var graphic = new esri.Graphic(geometry, symbol);;     }); }