AnsweredAssumed Answered

.setDefinitionExpression using geometry?

Question asked by jamesfreddyc Champion on May 29, 2018
Latest reply on May 30, 2018 by rscheitlin

Probably multiple ways to handle this, but I need to set a definition expression on a polygon FeatureLayer using the intersection of another polygon FeatureLayer.  I had been simply using a WHERE clause on an attribute, but the requirement has changed to use the geometry from a different FeatureLayer.


Any help is appreciated.


What I have so far:


createFuncLocLayer: function () {
      this.funcLocLayer = new FeatureLayer(this.config.functionalLocationLayer);
      this.workplanBoundaryLayer.queryFeatures(this.queryWorkplanLayer(), lang.hitch(this, function (result) {
        var wpGeometry = geometryEngine.geodesicBuffer(result.features[0].geometry, -20, "meters")
        //How can I apply this.funcLocLayer.setDefinitionExpression to use the wpGeometry variable?