AnsweredAssumed Answered

How can I use a variable that is set in a function on an on event outside of the event?

Question asked by mstranovsky on Sep 2, 2015
Latest reply on Sep 2, 2015 by odoe

For instance:

 

featureLayer.on("selection-complete", function (result){

        var pPoly = result.features[0].geometry;

});

console.log(pPoly);

 

the console returns undefined

Outcomes