forked from SuperMap/iClient-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathThemeService.js
More file actions
48 lines (45 loc) · 1.73 KB
/
Copy pathThemeService.js
File metadata and controls
48 lines (45 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
import '../core/Base';
import {ServiceBase} from './ServiceBase';
import { ThemeService as CommonThemeService } from '@supermap/iclient-common/iServer/ThemeService';
/**
* @class ThemeService
* @category iServer Map Theme
* @classdesc 专题图服务类。
* @extends {ServiceBase}
* @example
* new ThemeService(url,{
* projection:projection
* }).getThemeInfo(params,function(result){
* //doSomething
* });
* @param {string} url - 服务地址。
* @param {Object} options - 参数。
* @param {string} [options.proxy] - 服务代理地址。
* @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
* @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
* @param {Object} [options.headers] - 请求头。
* @usage
*/
export class ThemeService extends ServiceBase {
constructor(url, options) {
super(url, options);
this._themeService = new CommonThemeService(this.url, {
proxy: this.options.proxy,
withCredentials: this.options.withCredentials,
crossOrigin:this.options.crossOrigin,
headers:this.options.headers
});
}
/**
* @function ThemeService.prototype.getThemeInfo
* @description 获取专题图信息。
* @param {ThemeParameters} params - 专题图参数类。
* @param {RequestCallback} callback - 回调函数。
*/
getThemeInfo(params, callback) {
this._themeService.processAsync(params, callback);
}
}