异步传参

var myGetFeaturesByIDsService = new SuperMap.REST.GetFeaturesByIDsService(url, {
    eventListeners: {
        "processCompleted": getFeatureCompleted,
        "processFailed": getFeatureError
           }
    });
myGetFeaturesByIDsService.processAsync(getFeatureByIDsParams);
myGetFeaturesByIDsService.name = "zhang";
function getFeatureCompleted(GetFeaturesEventArgs){
    //todo
    var t = this.name;
};
function getFeatureError(GetFeaturesEventArgs){//todo}

  

原文地址:https://www.cnblogs.com/jiktiv123/p/8351900.html