AnsweredAssumed Answered

''wkid' undefined' error message for buffer polygon

Question asked by lkoumis on Dec 5, 2015
Latest reply on Dec 6, 2015 by lkoumis

This error consumed me some time and I can't see the problem that brings the wkid error.

At first, a buffer is drawn around a line (identified as gra below), then I use the buffer polygon to capture any features from the feature service that are located within the buffer polygon. The buffer is drawn around the line, but the second query brings the error. Suggestions? Thank you.

 

getthelinebuffer: function(){

   mysymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_NONE, new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT, new Color([255,0,0]), 2), new Color([255,255,0,0.25]));

 

  var resultEvent;

  geodesicBuffer.distances = [1];

  geodesicBuffer.geometries = [gra.geometry];

  geodesicBuffer.unit = bufferunit;

  geodesicBuffer.outSpatialReference = this.map.spatialReference;

  geodesicBuffer.geodesic = true;

  geodesicBuffer.unionResults = true;

 

 

  esriConfig.defaults.geometryService.buffer(geodesicBuffer, lang.hitch(this, function (evt) {

  resultEvent = evt[0];

  geodesicUserGraphic = new Graphic(Polygon, mysymbol);

------

  }));

 

  geodesicUserGraphic.geometry = resultEvent;

   bufferGraphicsLayer.add(geodesicUserGraphic);

          

          }));

 

   this.map.addLayer(bufferGraphicsLayer);

   var featureLayer = new FeatureLayer("xxxxx/0");

  var myquery = new Query();

          myquery.geometry = [resultEvent];

   myquery.returnGeometry=true;

   myquery.outFields=["X", "Y"];

    myquery.spatialRelationship = "esriSpatialRelIntersects";

 

   featureLayer.queryFeatures(myquery, this.selectInBuffer);

 

  },

 

selectInBuffer:function(){

------

 

},

Outcomes