AnsweredAssumed Answered

Call back return value Scope problem

Question asked by Nadir_Hussain on Mar 28, 2016
Latest reply on Apr 5, 2016 by processing...

var dist1;

getDistance(clickedPt,gp.geometry,function(dist){

                              dist1=dist;

                              alert("inside"+dist1);

                           

                         });

alert("outside"+dist1);

result inside block shows.but outside undefined.how to get dist outside from get distance block.dist1 undefined.Please help what can be the reason.

 

Thanks

Outcomes