Class: OnlineServiceBase

SuperMap.OnlineServiceBase

Online 服务基类(使用 key 作为权限限制的类需要实现此类)。

new SuperMap.OnlineServiceBase(options)

common/online/OnlineServiceBase.js, line 10
Name Type Description
options Object

服务参数。

Name Type Description
crossOrigin boolean 可选

是否允许跨域请求。

headers Object 可选

请求头。

Methods

createCredentialUrl(url)

common/online/OnlineServiceBase.js, line 45

追加授权信息。

Name Type Description
url string

对接的 online 服务地址。

request(method, url, param, requestOptions){Promise}

common/online/OnlineServiceBase.js, line 27

请求 online 服务

Name Type Default Description
method string 'GET' 可选

请求方式, 'GET', 'PUT', 'POST', 'DELETE'。

url string

服务地址。

param Object

URL 查询参数。

requestOptions Object 可选

http 请求参数, 比如请求头,超时时间等。

Returns:
Type Description
Promise 返回包含请求结果的 Promise 对象。