cd-mapgis 1.1.29 → 1.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.d.ts +76 -39
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cd-mapgis",
3
- "version": "1.1.29",
3
+ "version": "1.1.31",
4
4
  "main": "./src/index.js",
5
5
  "types": "./src/index.d.ts",
6
6
  "type": "module",
package/src/index.d.ts CHANGED
@@ -1,50 +1,50 @@
1
1
  declare module 'cd-mapgis' {
2
2
  export class MapView {
3
+ static Instance: MapView | null;
4
+ static CHINA_EXTENT: [number, number, number, number];
3
5
  constructor(p: any);
4
6
  layerGroupViewOne(group: string, key: string): void;
5
7
  viewOnTemplayer(p: any): void;
6
8
  clearTemplayer(): void;
7
- expandExtent(): void;
9
+ expandExtent(extent: number[]): number[];
8
10
  setCenter(center: [number, number], useAnimation?: boolean): void;
9
11
  setZoom(zoom: number): void;
10
12
  addEvent(name: string, fun: any): any;
11
13
  addEventOnce(name: string, fun: any): void;
12
14
  removeEvent(key: any): void;
13
15
  viewMousePoint(call: any): void;
14
- startDraw(type: string, fun: any): void;
16
+ startDraw(type: 'Polygon' | 'Point' | 'LineString', fun: any): void;
15
17
  tool(type: string): void;
16
18
  clearDraw(): void;
17
- viewToLayer(layer: any): void;
19
+ viewToLayer(layer: any): boolean;
20
+ dragPan(flag: boolean): void;
21
+ startSwipe(layer: any, model: number): void;
22
+ closeSwipe(): void;
23
+ reSet(): void;
24
+ getVisiblePolygon(): number[][];
18
25
  }
19
26
  export class OM {
20
- static map: any;
21
- static view: any;
22
- static initMap(p: {
23
- target?: string;
24
- center?: [number, number];
25
- zoom?: number;
26
- projection?: string;
27
- layers?: any[];
28
- }): void;
29
- static viewOnTemplayer(p: {
30
- data: string;
31
- }): void;
32
- static expandExtent(extent: number[]): number[];
33
- static addOverlay(p: { html: string, point: number[], positioning?: string }): void;
34
27
  static initParam(params: any): void;
35
28
  static post(url: string, data: any): Promise<any>;
29
+ static getIp(text: string): string;
36
30
  static getDic(key: string): Promise<any>;
31
+ static getPushLayer(p: any): Promise<any>;
32
+ static getBound(p: any): Promise<any>;
33
+ static queryByPoint(p: any): Promise<any>;
34
+ static updateLayerAttr(p: any): Promise<any>;
35
+ static saveGeometryAndAttr(p: any): Promise<any>;
36
+ static removeGeometry(p: any): Promise<any>;
37
37
  static getLayerAttrPage(p: any): Promise<any>;
38
38
  static clip(p: any): Promise<any>;
39
39
  static overlaps(p: any): Promise<any>;
40
40
  static total(p: any): Promise<any>;
41
41
  static buffer(p: any): Promise<any>;
42
- static getBound(p: any): Promise<any>;
43
42
  static checkPushLayers(p: any): Promise<any>;
44
- static getLayerAttr(p: any): Promise<any>;
45
43
  static getAddressByPoint(p: any): Promise<any>;
44
+ static getFields(p: any): Promise<any>;
45
+ static exportLayerAttr(p: { tableName: string }): void;
46
46
  static viewLayers(p: any): Promise<any>;
47
- static fitToLayers(p: any): void;
47
+ static fitToLayer(p: any): Promise<void>;
48
48
  }
49
49
  export class LayerUtil {
50
50
  static _tdt_map: {
@@ -53,19 +53,19 @@ declare module 'cd-mapgis' {
53
53
  vec_w: string;
54
54
  cva_w: string;
55
55
  };
56
- static xyz(p: {
57
- name: string;
58
- url: string;
59
- projection?: string;
60
- }): any;
61
- static ngXyz(p: {
62
- name?: string;
63
- url: string;
64
- }): any;
65
- static onLineTianditu(p: {
66
- type: string;
67
- tk: string;
68
- }): any;
56
+ static xyz(p: { name: string; url: string; projection?: string }): any;
57
+ static ngXyz(p: { name?: string; url: string }): any;
58
+ static onLineTianditu(
59
+ p:
60
+ {
61
+ type: string;
62
+ tk: string;
63
+ }
64
+ | {
65
+ t: string;
66
+ tk: string;
67
+ }
68
+ ): any;
69
69
  static geoServerWmsLayer(p: {
70
70
  workspace: string;
71
71
  name: string;
@@ -74,21 +74,58 @@ declare module 'cd-mapgis' {
74
74
  cql?: string;
75
75
  };
76
76
  }): any;
77
- static getWmtsLayer(p: {
78
- url: string;
79
- }): Promise<any>;
77
+ static getWmtsLayer(p: { urlPre: string; urlNext?: string }): Promise<any>;
80
78
  static getJsonLayer(p: any): any;
79
+ static getWktLayer(p: any): any;
80
+ static getTracePointsLayer(p: any): any;
81
81
  static getJsonPointsLayer(p: any): any;
82
82
  static getJsonPolygonsLayer(p: any): any;
83
+ static getPolygonsLayer(p: any): any;
84
+ static getPolygonLayerByRect(p: any): any;
85
+ static getPolygonLayerByPoints(p: any): any;
83
86
  }
84
87
  export class Overlay {
85
88
  constructor(data: any);
86
89
  addToMap(map: any): void;
87
90
  remove(map: any): void;
88
91
  }
89
- export class httpUtil {
92
+ export class HttpUtil {
90
93
  static get(url: string): Promise<any>;
91
- static post(url: string, data?: any, headers?: Array): Promise<any>;
94
+ static post(url: string, data?: any, headers?: any[]): Promise<any>;
95
+ }
96
+ export class InnerUtil {
97
+ static getGeoServerUrl(url: string, host?: string): string;
98
+ static getWktByRect(rect: number[]): string;
99
+ static getWktByPoints(data: number[][]): string;
100
+ static registCompass(p: any): void;
101
+ }
102
+ export class StyleUtil {
103
+ static getViewOnTemplayerStyle(): any;
104
+ static getMapDrawStyle(): any;
105
+ static getInteractionStyle(): any;
106
+ static getIcon(p: any): any;
107
+ static getText(p: any): any;
108
+ static getPointStyle(p: any): any;
109
+ static getPolygonStyle(p: any): any;
110
+ static getCommStyle(p: any): any;
111
+ }
112
+ export class Location {
113
+ constructor(p: any);
114
+ mark(point: [number, number]): void;
115
+ }
116
+ export class PointLayer {
117
+ constructor(p: any);
118
+ addPoint(p: any): void;
119
+ addPoints(points: any[]): void;
120
+ clearAll(): void;
121
+ onClick(callback: (feature: any, event: any) => void): void;
122
+ fitToLayer(p?: any): void;
123
+ }
124
+ export class LineLayer {
125
+ constructor(p: any);
126
+ addLine(p: any): void;
127
+ addLines(lines: any[]): void;
128
+ onClick(callback: (feature: any, event: any) => void): void;
129
+ fitToLayer(p?: any): void;
92
130
  }
93
131
  }
94
-