new SuperMap.CommonServiceBase(url, options)
| Name | Type | Description | 
|---|---|---|
url | 
            
            
            string | 
                
                 服务地址。  | 
        
options | 
            
            
            Object | 
                
                 可选参数。如:  | 
        
Methods
- 
    
ajaxPolling()
common/iServer/CommonServiceBase.js, line 215 - 
    
    
    
请求失败后,如果剩余请求失败次数不为0,重新获取url发送请求
 - 
    
calculatePollingTimes()
common/iServer/CommonServiceBase.js, line 233 - 
    
    
    
计算剩余请求失败执行次数。
 - 
    
destroy()
common/iServer/CommonServiceBase.js, line 85 - 
    
    
    
释放资源,将引用的资源属性置空。
 - 
    
getCredential(url){SuperMap.Credential}
common/iServer/CommonServiceBase.js, line 155 - 
    
    
    
获取凭据信息
Name Type Description urlstring 服务地址。
Returns:
Type Description SuperMap.Credential 凭据信息对象。  - 
    
getUrlCompleted(result)
common/iServer/CommonServiceBase.js, line 188 - 
    
    
    
请求成功后执行此方法。
Name Type Description resultObject 服务器返回的结果对象。
 - 
    
getUrlFailed(result)
common/iServer/CommonServiceBase.js, line 199 - 
    
    
    
请求失败后执行此方法。
Name Type Description resultObject 服务器返回的结果对象。
 - 
    
isServiceSupportPolling()
common/iServer/CommonServiceBase.js, line 260 - 
    
    
    
判断服务是否支持轮询。
 - 
    
request(options)
common/iServer/CommonServiceBase.js, line 113 - 
    
    
    
    
    
    
    
        
Name Type Description optionsObject 参数。 method - {string} 请求方式,包括"GET","POST","PUT","DELETE"。
url - {string} 发送请求的地址。
params - {Object} 作为查询字符串添加到url中的一组键值对,此参数只适用于GET方式发送的请求。
data - {String } 发送到服务器的数据。
success - {function} 请求成功后的回调函数。
failure - {function} 请求失败后的回调函数。
scope - {Object} 如果回调函数是对象的一个公共方法,设定该对象的范围。
isInTheSameDomain - {boolean} 请求是否在当前域中。 - 
    
serviceProcessCompleted(result)
common/iServer/CommonServiceBase.js, line 272 - 
    
    
    
状态完成,执行此方法。
Name Type Description resultObject 服务器返回的结果对象。
 - 
    
serviceProcessFailed(result)
common/iServer/CommonServiceBase.js, line 282 - 
    
    
    
状态失败,执行此方法。
Name Type Description resultObject 服务器返回的结果对象。