1
1
/* Copyright© 2000 - 2022 SuperMap Software Co.Ltd. All rights reserved.
2
2
* This program are made available under the terms of the Apache License, Version 2.0
3
3
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
4
- import { ServiceBase } from './ServiceBase' ;
4
+ import { ServiceBase } from './ServiceBase' ;
5
5
import { MapService as CommonMapService } from '@supermap/iclient-common/iServer/MapService' ;
6
6
import { TilesetsService } from '@supermap/iclient-common/iServer/TilesetsService' ;
7
-
8
7
/**
9
8
* @class MapService
10
9
* @category iServer Map
@@ -23,52 +22,69 @@ import { TilesetsService } from '@supermap/iclient-common/iServer/TilesetsServic
23
22
* @usage
24
23
*/
25
24
export class MapService extends ServiceBase {
25
+ constructor ( url , options ) {
26
+ super ( url , options ) ;
27
+ }
26
28
27
- constructor ( url , options ) {
28
- super ( url , options ) ;
29
- }
29
+ /**
30
+ * @function MapService.prototype.getMapInfo
31
+ * @description 地图信息查询服务。
32
+ * @param {RequestCallback } callback - 回调函数。
33
+ * @returns {MapService } 获取服务信息。
34
+ */
35
+ getMapInfo ( callback ) {
36
+ var me = this ;
37
+ var getMapStatusService = new CommonMapService ( me . url , {
38
+ proxy : me . options . proxy ,
39
+ withCredentials : me . options . withCredentials ,
40
+ crossOrigin : me . options . crossOrigin ,
41
+ headers : me . options . headers ,
42
+ eventListeners : {
43
+ scope : me ,
44
+ processCompleted : callback ,
45
+ processFailed : callback
46
+ } ,
47
+ projection : me . options . projection
48
+ } ) ;
49
+ getMapStatusService . processAsync ( ) ;
50
+ }
30
51
31
- /**
32
- * @function MapService.prototype.getMapInfo
33
- * @description 地图信息查询服务。
34
- * @param {RequestCallback } callback - 回调函数。
35
- * @returns {MapService } 获取服务信息。
36
- */
37
- getMapInfo ( callback ) {
38
- var me = this ;
39
- var getMapStatusService = new CommonMapService ( me . url , {
40
- proxy : me . options . proxy ,
41
- withCredentials : me . options . withCredentials ,
42
- crossOrigin : me . options . crossOrigin ,
43
- headers : me . options . headers ,
44
- eventListeners : {
45
- scope : me ,
46
- processCompleted : callback ,
47
- processFailed : callback
48
- } , projection : me . options . projection
49
- } ) ;
50
- getMapStatusService . processAsync ( ) ;
51
- }
52
+ getWkt ( callback ) {
53
+ var me = this ;
54
+ var getMapStatusService = new CommonMapService ( `${ me . url } /prjCoordSys.wkt` , {
55
+ proxy : me . options . proxy ,
56
+ withCredentials : me . options . withCredentials ,
57
+ withoutFormatSuffix : true ,
58
+ crossOrigin : me . options . crossOrigin ,
59
+ headers : me . options . headers ,
60
+ eventListeners : {
61
+ scope : me ,
62
+ processCompleted : callback ,
63
+ processFailed : callback
64
+ } , projection : me . options . projection
65
+ } ) ;
66
+ getMapStatusService . processAsync ( ) ;
67
+ }
52
68
53
- /**
54
- * @function MapService.prototype.getTilesets
55
- * @description 切片列表信息查询服务。
56
- * @param {RequestCallback } callback - 回调函数。
57
- * @returns {MapService } 获取服务信息。
58
- */
59
- getTilesets ( callback ) {
60
- var me = this ;
61
- var tilesetsService = new TilesetsService ( me . url , {
62
- proxy : me . options . proxy ,
63
- withCredentials : me . options . withCredentials ,
64
- crossOrigin : me . options . crossOrigin ,
65
- headers : me . options . headers ,
66
- eventListeners : {
67
- scope : me ,
68
- processCompleted : callback ,
69
- processFailed : callback
70
- }
71
- } ) ;
72
- tilesetsService . processAsync ( ) ;
73
- }
69
+ /**
70
+ * @function MapService.prototype.getTilesets
71
+ * @description 切片列表信息查询服务。
72
+ * @param {RequestCallback } callback - 回调函数。
73
+ * @returns {MapService } 获取服务信息。
74
+ */
75
+ getTilesets ( callback ) {
76
+ var me = this ;
77
+ var tilesetsService = new TilesetsService ( me . url , {
78
+ proxy : me . options . proxy ,
79
+ withCredentials : me . options . withCredentials ,
80
+ crossOrigin : me . options . crossOrigin ,
81
+ headers : me . options . headers ,
82
+ eventListeners : {
83
+ scope : me ,
84
+ processCompleted : callback ,
85
+ processFailed : callback
86
+ }
87
+ } ) ;
88
+ tilesetsService . processAsync ( ) ;
89
+ }
74
90
}
0 commit comments