mirage2d 1.1.94 → 1.1.96
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.
- package/dist/Layer/XMap.d.ts +70 -9
- package/dist/Layer/tileLayer/TileXyzLayer.d.ts +1 -1
- package/dist/base/baseOptionType.d.ts +22 -0
- package/dist/graphic/DivGraphic.d.ts +15 -0
- package/dist/mirage2d.cjs.js +37 -37
- package/dist/mirage2d.umd.js +37 -37
- package/package.json +1 -1
- package/dist/css/css/ol-contextmenu.css +0 -115
- package/dist/css/css/ol-ext.css +0 -6582
- package/dist/css/css/ol.css +0 -285
package/dist/Layer/XMap.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { OverviewMap } from "ol/control";
|
|
|
5
5
|
import { XMeasure } from "../Tools/measure";
|
|
6
6
|
import { crsType } from "../Enum/typeEnum";
|
|
7
7
|
import { baseMap } from "../base/baseMap";
|
|
8
|
+
import { IMapViewOption } from '../base/baseOptionType';
|
|
8
9
|
import { FitOptions } from "ol/View";
|
|
9
10
|
import { Extent } from 'ol/extent';
|
|
10
11
|
import { Geometry, SimpleGeometry } from 'ol/geom';
|
|
@@ -38,28 +39,40 @@ export declare class MirageMap extends baseMap {
|
|
|
38
39
|
};
|
|
39
40
|
Proj: proj;
|
|
40
41
|
private splitInteraction;
|
|
42
|
+
private _multiWindow;
|
|
41
43
|
constructor(mapID: string, option: any);
|
|
42
|
-
_addTipElement
|
|
44
|
+
private _addTipElement;
|
|
43
45
|
/**
|
|
44
46
|
* @param {string} mapID
|
|
45
47
|
*/
|
|
46
48
|
init(mapID: string): void;
|
|
47
49
|
openSplitInteraction(layer: any): void;
|
|
48
50
|
closeSplitInteraction(): void;
|
|
51
|
+
/**
|
|
52
|
+
* @description 显示网格
|
|
53
|
+
*/
|
|
49
54
|
showGridkInfo(): void;
|
|
55
|
+
/**
|
|
56
|
+
* @description 显示网格
|
|
57
|
+
*/
|
|
50
58
|
showGrid(option: {
|
|
51
59
|
lineColor: 'rgba(0, 0, 0, 1)';
|
|
52
60
|
size: 50;
|
|
53
61
|
}): void;
|
|
54
|
-
|
|
62
|
+
/**
|
|
63
|
+
* @description 显示鹰眼
|
|
64
|
+
* @param { string | HTMLElement} target 承载元素
|
|
65
|
+
* @param {string} layername option所包含的图层名称
|
|
66
|
+
*/
|
|
67
|
+
showOverView(target: string | HTMLElement, layername?: string): void;
|
|
55
68
|
bindmenu(): void;
|
|
56
69
|
bindContextmenu(menu?: any): void;
|
|
57
70
|
appendContextmenu(menu: any): void;
|
|
58
71
|
scaleControl(scaleType: any): any;
|
|
59
72
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
* @description: 设置背景图显示/隐藏
|
|
74
|
+
* @param {boolean} isshow
|
|
75
|
+
*/
|
|
63
76
|
setZoomControlVisible(isshow?: boolean): void;
|
|
64
77
|
/**
|
|
65
78
|
* @description: 设置背景图显示/隐藏
|
|
@@ -102,19 +115,44 @@ export declare class MirageMap extends baseMap {
|
|
|
102
115
|
addLayer(layer: any): void;
|
|
103
116
|
removeLayer(layerid: any): void;
|
|
104
117
|
/**
|
|
105
|
-
* @description:
|
|
106
|
-
* @param {
|
|
107
|
-
* @
|
|
118
|
+
* @description: 设置经纬度中心点
|
|
119
|
+
* @param {number[]} lnglat 坐标数组
|
|
120
|
+
* @param {number} zoom 级别
|
|
121
|
+
* @param {boolean} flash 是否闪烁
|
|
108
122
|
*/
|
|
109
123
|
setCenterBy4326(lnglat: number[], zoom?: number, flash?: boolean): void;
|
|
124
|
+
/**
|
|
125
|
+
* @description: 设置中心点,默认3857坐标
|
|
126
|
+
* @param {number[]} lnglat 坐标数组
|
|
127
|
+
* @param {number} zoom 级别
|
|
128
|
+
* @param {crsType} dataWkID 坐标wkid
|
|
129
|
+
* @param {boolean} flash 是否闪烁
|
|
130
|
+
*/
|
|
110
131
|
setCenter(lnglat: number[], zoom?: number, dataWkID?: crsType, flash?: boolean): void;
|
|
132
|
+
/**
|
|
133
|
+
* @description: 获取当前视窗中心及级别
|
|
134
|
+
* @return {any} {center,level}
|
|
135
|
+
*/
|
|
111
136
|
getView(): {
|
|
112
137
|
center: import("ol/coordinate").Coordinate;
|
|
113
138
|
level: number;
|
|
114
139
|
};
|
|
140
|
+
/**
|
|
141
|
+
* @description: 获取当前视窗四角范围
|
|
142
|
+
* @return {Extent} {x1,y1,x2,y2}
|
|
143
|
+
*/
|
|
115
144
|
getExtent(): Extent;
|
|
145
|
+
/**
|
|
146
|
+
* @description: 显示闪烁点
|
|
147
|
+
* @param {number[]} coordinate 坐标数组
|
|
148
|
+
*/
|
|
116
149
|
showflashPoint(coordinate: number[]): void;
|
|
117
|
-
|
|
150
|
+
/**
|
|
151
|
+
* @description: 视角定位动画,默认当前定位后放大1级
|
|
152
|
+
* @param {number[]} coordinate 坐标数组
|
|
153
|
+
* @param {number} duration 过程时间
|
|
154
|
+
*/
|
|
155
|
+
lookToAnimate(coordinate: number[], duration?: number): void;
|
|
118
156
|
/**
|
|
119
157
|
* @description: 定位到经纬度
|
|
120
158
|
* @param {number[]} option.location: 经纬度[],
|
|
@@ -134,6 +172,16 @@ export declare class MirageMap extends baseMap {
|
|
|
134
172
|
duration3?: number;
|
|
135
173
|
callback?: Function;
|
|
136
174
|
}): any;
|
|
175
|
+
/**
|
|
176
|
+
* @description: 定位到经纬度
|
|
177
|
+
* @param {number[] | Geometry | Feature} option.location: 经纬度[]或 Geometry | Feature,
|
|
178
|
+
* @param {number} option.firstzoom: 初始zoom,
|
|
179
|
+
* @param {number} option.tozoom: 目标zoom,
|
|
180
|
+
* @param {number} option.duration1: 拉高时间,
|
|
181
|
+
* @param {number} option.duration2: 平移时间,
|
|
182
|
+
* @param {number} option.duration3: 降落时间,
|
|
183
|
+
* @param {Function} option.callback: Function 完成后回调
|
|
184
|
+
*/
|
|
137
185
|
flyTo(option: {
|
|
138
186
|
location: number[] | Geometry | Feature;
|
|
139
187
|
firstzoom?: number;
|
|
@@ -185,6 +233,19 @@ export declare class MirageMap extends baseMap {
|
|
|
185
233
|
*/
|
|
186
234
|
showBaseMap(enabled: boolean): void;
|
|
187
235
|
/**
|
|
236
|
+
* @description: 显示多窗口,options参数数量决定窗口数量
|
|
237
|
+
* @param {object} options
|
|
238
|
+
* @ {string | HTMLElement} options.target 承载div的id
|
|
239
|
+
* @ {string } options.baselayer 底图名,默认当前底图
|
|
240
|
+
* @ {any} options.overLayer 覆盖层,tilelayer
|
|
241
|
+
* @ {boolean} options.syncGraphicLayer 是否同步矢量层
|
|
242
|
+
*/
|
|
243
|
+
showMultiWindow(options: IMapViewOption[]): void;
|
|
244
|
+
/**
|
|
245
|
+
* @description:隐藏多窗口,仅做地图关联销毁,不处理样式及div销毁
|
|
246
|
+
*/
|
|
247
|
+
hideMultiWindow(): void;
|
|
248
|
+
/**
|
|
188
249
|
* @description: 设置地图参数
|
|
189
250
|
* @param {string} key
|
|
190
251
|
* @param {string} val
|
|
@@ -302,5 +302,27 @@ export interface IDivGraphicOption {
|
|
|
302
302
|
positioning?: Positioning;
|
|
303
303
|
hashMove?: boolean;
|
|
304
304
|
enabledRightMenu?: boolean;
|
|
305
|
+
enabledPopup?: boolean;
|
|
306
|
+
enabledTooltip?: boolean;
|
|
305
307
|
contextmenu?: Array<IContextmenu>;
|
|
308
|
+
popupInfo?: Array<ITooltipInfo> | string;
|
|
309
|
+
tooltipInfo?: Array<ITooltipInfo> | string;
|
|
310
|
+
tooltipOption?: {
|
|
311
|
+
offset: Array<number>;
|
|
312
|
+
};
|
|
313
|
+
popupOption?: {
|
|
314
|
+
offset: Array<number>;
|
|
315
|
+
};
|
|
316
|
+
attribute?: any;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* @description: 多窗口参数
|
|
320
|
+
* @param {string | HTMLElement} target 容器
|
|
321
|
+
* @param {string} layername 图层名
|
|
322
|
+
*/
|
|
323
|
+
export interface IMapViewOption {
|
|
324
|
+
target?: string | HTMLElement;
|
|
325
|
+
baselayer?: string;
|
|
326
|
+
overLayer?: any;
|
|
327
|
+
syncGraphicLayer?: boolean;
|
|
306
328
|
}
|
|
@@ -15,6 +15,21 @@ export declare class DivGraphic extends Overlay {
|
|
|
15
15
|
endEdit(): void;
|
|
16
16
|
remove(): void;
|
|
17
17
|
setCoordinates(lng: number, lat: number, dataWkID?: crsType): void;
|
|
18
|
+
unbindContextmenu(): void;
|
|
19
|
+
appendContextmenu(menu: any): void;
|
|
20
|
+
bindPopup(popupInfo: string, option?: {
|
|
21
|
+
offset: number[];
|
|
22
|
+
}): void;
|
|
23
|
+
unbindPopup(): void;
|
|
24
|
+
openPopup(): void;
|
|
25
|
+
closePopup(target?: any): void;
|
|
26
|
+
private _bindPoupEvent;
|
|
27
|
+
bindTooltip(tooltipInfo: string, option?: {
|
|
28
|
+
offset: number[];
|
|
29
|
+
}): void;
|
|
30
|
+
unbindTooltip(): void;
|
|
31
|
+
showTooltip(): void;
|
|
32
|
+
closeTooltip(): void;
|
|
18
33
|
_on(type: string | number, fn: any): this;
|
|
19
34
|
off(type: string | number, fn: any): this;
|
|
20
35
|
/**
|