mirage2d 1.2.2 → 1.2.3
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/Enum/typeEnum.d.ts +63 -56
- package/dist/Layer/XMap.d.ts +146 -108
- package/dist/Layer/graphicLayer/ArcGisFeatureServiceLayer.d.ts +7 -7
- package/dist/Layer/graphicLayer/ClusterImageLayer.d.ts +9 -0
- package/dist/Layer/graphicLayer/ClusterLayer.d.ts +7 -0
- package/dist/Layer/graphicLayer/DayNightLayer.d.ts +7 -0
- package/dist/Layer/graphicLayer/DivLayer.d.ts +7 -0
- package/dist/Layer/graphicLayer/GraphicImageLayer.d.ts +7 -0
- package/dist/Layer/graphicLayer/GraphicLayer.d.ts +2 -2
- package/dist/Layer/graphicLayer/HeatmapLayer.d.ts +7 -0
- package/dist/Layer/graphicLayer/ImageCanvasLayer.d.ts +1 -1
- package/dist/Layer/graphicLayer/KmlLayer.d.ts +7 -0
- package/dist/Layer/graphicLayer/PathLayer.d.ts +44 -41
- package/dist/Layer/graphicLayer/WfsLayer.d.ts +18 -12
- package/dist/Layer/index.d.ts +10 -0
- package/dist/Layer/tileLayer/ArcGisMapServerLayer.d.ts +2 -1
- package/dist/Layer/tileLayer/ArcGisTileXyzLayer.d.ts +3 -3
- package/dist/Layer/tileLayer/GeoImageLayer.d.ts +17 -9
- package/dist/Layer/tileLayer/PbfLayer.d.ts +1 -1
- package/dist/Layer/tileLayer/TifLayer.d.ts +7 -0
- package/dist/Layer/tileLayer/TileBaiDuLayer.d.ts +3 -3
- package/dist/Layer/tileLayer/TileGroupLayer.d.ts +13 -2
- package/dist/Layer/tileLayer/TileTencentLayer.d.ts +10 -3
- package/dist/Layer/tileLayer/TileXyzLayer.d.ts +11 -4
- package/dist/Layer/tileLayer/WmsLayer.d.ts +8 -0
- package/dist/Layer/tileLayer/WmtsLayer.d.ts +8 -0
- package/dist/Layer/tileLayer/imageLayer.d.ts +7 -0
- package/dist/MirageHttp.es.js.map +205 -1
- package/dist/MirageHttp.umd.js.map +1263 -1
- package/dist/Tools/SpatialAnalysis.d.ts +235 -215
- package/dist/Tools/defaultStyle.d.ts +7 -0
- package/dist/Tools/measure.d.ts +7 -0
- package/dist/Tools/secret.d.ts +12 -6
- package/dist/Tools/toolbox.d.ts +2 -3
- package/dist/Tools/util/format.d.ts +21 -1
- package/dist/Tools/util/index.d.ts +10 -0
- package/dist/Tools/util/isutil.d.ts +27 -17
- package/dist/Tools/util/tools.d.ts +10 -0
- package/dist/base/EventType.d.ts +7 -0
- package/dist/base/FeatureEventType.d.ts +7 -0
- package/dist/base/LayerEventType.d.ts +7 -0
- package/dist/base/MapEventType.d.ts +7 -0
- package/dist/base/base.d.ts +30 -3
- package/dist/base/baseClass.d.ts +22 -5
- package/dist/base/baseGraphicLayer.d.ts +93 -77
- package/dist/base/baseLayer.d.ts +7 -0
- package/dist/base/baseMap.d.ts +7 -0
- package/dist/base/baseOptionType.d.ts +15 -5
- package/dist/base/baseTileLayer.d.ts +10 -0
- package/dist/base/eventTarget.d.ts +10 -0
- package/dist/extend/Control/baseLayerSwitch.d.ts +15 -1
- package/dist/extend/Control/drawText.d.ts +11 -1
- package/dist/extend/Control/imageHJ.d.ts +10 -3
- package/dist/extend/Control/index.d.ts +14 -4
- package/dist/extend/Control/locationbar.d.ts +10 -3
- package/dist/extend/Control/swipe.d.ts +16 -5
- package/dist/extend/interaction/SelectTransform.d.ts +4 -5
- package/dist/extend/tykg.d.ts +5 -5
- package/dist/graphic/Curve.d.ts +10 -0
- package/dist/graphic/DivGraphic.d.ts +13 -4
- package/dist/graphic/baseGraphic.d.ts +63 -60
- package/dist/graphic/index.d.ts +10 -0
- package/dist/index.d.ts +7 -0
- package/dist/lib/includeLibs.js +23 -24
- package/dist/mirage2d.cjs.js +37 -37
- package/dist/mirage2d.umd.js +37 -37
- package/dist/proj4/proj.d.ts +22 -10
- package/dist/query/GaodePOI.d.ts +10 -0
- package/dist/query/GaodeRoute.d.ts +17 -0
- package/dist/query/baseGaode.d.ts +7 -0
- package/dist/query/index.d.ts +10 -0
- package/package.json +26 -7
- package/readme.md +12 -12
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-07-21 12:45:51
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2022-11-26 16:52:52
|
|
6
|
+
* @FilePath: \Map2D\src\base\baseTileLayer.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
import { baseLayer } from "./baseLayer";
|
|
2
12
|
import { MirageMap } from "../Layer/XMap";
|
|
3
13
|
import { Feature } from "ol";
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-08-29 14:42:22
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2022-09-15 19:09:48
|
|
6
|
+
* @FilePath: \Map2D\src\base\EventTarget.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
interface AnyFunc {
|
|
2
12
|
(...args: unknown[]): unknown;
|
|
3
13
|
}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-09-15 20:15:34
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-05-10 14:05:00
|
|
6
|
+
* @FilePath: \Map2D\src\extend\Control\baseLayerSwitch.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
import { Control } from "ol/control";
|
|
2
12
|
export declare class baseLayerSwitch extends Control {
|
|
3
13
|
private _isshow;
|
|
@@ -5,7 +15,11 @@ export declare class baseLayerSwitch extends Control {
|
|
|
5
15
|
mianImage: HTMLImageElement;
|
|
6
16
|
mianLabel: HTMLDivElement;
|
|
7
17
|
/**
|
|
8
|
-
*
|
|
18
|
+
* 基础图层切换
|
|
19
|
+
* @param {object} [opt_options] Control options.
|
|
20
|
+
* @param {string} defaultImageName
|
|
21
|
+
* @param {any} baseLayerList
|
|
22
|
+
* @param {any} setBaseLayer
|
|
9
23
|
*/
|
|
10
24
|
constructor(opt_options: {}, defaultImageName: string, baseLayerList: any[], setBaseLayer: {
|
|
11
25
|
(e: any): void;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-10-15 19:50:33
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-04-10 19:59:00
|
|
6
|
+
* @FilePath: \Map2D\src\extend\Control\drawText.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
import { Control } from "ol/control";
|
|
2
12
|
export declare class drawTextControl extends Control {
|
|
3
13
|
private _mouseposition;
|
|
4
14
|
constructor(opt_options: any);
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-09-15 20:15:34
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-05-25 15:49:43
|
|
6
|
+
* @FilePath: \Map2D\src\extend\Control\imageHJ.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
import { Control } from "ol/control";
|
|
2
12
|
export declare class imageHJ extends Control {
|
|
3
|
-
/**
|
|
4
|
-
* @param {Object} [opt_options] Control options.
|
|
5
|
-
*/
|
|
6
13
|
constructor(opt_options: any);
|
|
7
14
|
show(): void;
|
|
8
15
|
hide(): void;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-10-15 19:31:14
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-04-07 17:38:22
|
|
6
|
+
* @FilePath: \Map2D\src\extend\Control\index.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
export { Locationbar } from "./locationbar";
|
|
12
|
+
export { baseLayerSwitch } from "./baseLayerSwitch";
|
|
13
|
+
export { swipeControl } from "./swipe";
|
|
14
|
+
export { drawTextControl } from "./drawText";
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-09-15 20:15:34
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-05-25 15:39:34
|
|
6
|
+
* @FilePath: \Map2D\src\extend\Control\locationbar.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
import { Control } from "ol/control";
|
|
2
12
|
export declare class Locationbar extends Control {
|
|
3
13
|
private _mouseposition;
|
|
4
|
-
/**
|
|
5
|
-
* @param {Object} [opt_options] Control options.
|
|
6
|
-
*/
|
|
7
14
|
constructor(opt_options: any);
|
|
8
15
|
show(): void;
|
|
9
16
|
hide(): void;
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-10-15 19:50:33
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2022-11-26 14:05:43
|
|
6
|
+
* @FilePath: \Map2D\src\extend\Control\swipe.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
import { eventTarget } from "../../base/eventTarget";
|
|
2
12
|
export declare class swipeControl extends eventTarget {
|
|
3
13
|
private _swipe;
|
|
4
14
|
constructor();
|
|
5
15
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
* : 添加分屏控件
|
|
17
|
+
* @param {string} leftlayerID 左(上)屏幕
|
|
18
|
+
* @param {string} rightlayerID 右(下)屏幕
|
|
19
|
+
* @param {string} orientation 方向默认值 "vertical" 水平 "horizontal"
|
|
20
|
+
* @returns {*}
|
|
21
|
+
*/
|
|
11
22
|
show(leftlayerID: any, rightlayerID: any, orientation?: string): void;
|
|
12
23
|
hide(): void;
|
|
13
24
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export declare class SelectTransform {
|
|
2
2
|
transformInteraction: any;
|
|
3
|
+
constructor(options: any);
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
* 设置样式
|
|
6
|
+
* @param {boolean} isDefault
|
|
5
7
|
*/
|
|
6
|
-
|
|
7
|
-
/** Style the transform handles for the current interaction
|
|
8
|
-
*/
|
|
9
|
-
setHandleStyle(): void;
|
|
8
|
+
setHandleStyle(isDefault?: boolean): void;
|
|
10
9
|
appendTo(map: any): void;
|
|
11
10
|
setActive(b: any): void;
|
|
12
11
|
}
|
package/dist/extend/tykg.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { base } from "../base/base";
|
|
|
13
13
|
* @property {boolean} [xReverseOrder=false] - xReverseOrder,X反向编号,从大到小
|
|
14
14
|
* @property {boolean} [yReverseOrder=false] - yReverseOrder, Y反向编号,从大到小
|
|
15
15
|
* @property {string} [wkid] - wkid, wkid编号,不需要带【EPSG:】
|
|
16
|
-
* @property {
|
|
16
|
+
* @property {object} [createExtent] createExtent -绘制的外多变形限制范围
|
|
17
17
|
*/
|
|
18
18
|
export declare class tykg extends base {
|
|
19
19
|
Option: {
|
|
@@ -39,7 +39,7 @@ export declare class tykg extends base {
|
|
|
39
39
|
};
|
|
40
40
|
constructor();
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* 创建探方
|
|
43
43
|
* @param {object} options 参数
|
|
44
44
|
* @param {Array.<number>} [options.startPoint=[510367.2358, 2895576.008]] 起点坐标,西南角
|
|
45
45
|
* @param {number} [options.startNumberX=1] - startNumberX 东方向起始号
|
|
@@ -58,9 +58,9 @@ export declare class tykg extends base {
|
|
|
58
58
|
* @param {string} options.wkid - wkid, wkid编号,不需要带【EPSG:】
|
|
59
59
|
* @param {string} options.digit - 编号为位数,默认两位数
|
|
60
60
|
* @param {string} options.north - 默认北方向在前
|
|
61
|
-
* @param {
|
|
62
|
-
* @param {
|
|
63
|
-
* @
|
|
61
|
+
* @param {object} [options.createExtent] createExtent -绘制的外多变形限制范围
|
|
62
|
+
* @param {object} [options.excludeExtent] createExtent -绘制的外多变形限制范围
|
|
63
|
+
* @returns {*} 返回标准json数据,坐标系3857,如2000坐标系则返回带有2000坐标系数组
|
|
64
64
|
*/
|
|
65
65
|
createTF(options: any): {
|
|
66
66
|
type: string;
|
package/dist/graphic/Curve.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-07-19 18:25:04
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-04-02 19:34:17
|
|
6
|
+
* @FilePath: \Map2D\src\graphic\Curve.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
import { baseGraphic } from "./baseGraphic";
|
|
2
12
|
import { ICurveGraphicOption } from "../base/baseOptionType";
|
|
3
13
|
export declare class CurveGraphic extends baseGraphic {
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-07-19 10:21:41
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-05-18 18:51:53
|
|
6
|
+
* @FilePath: \Map2D\src\graphic\DivGraphic.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
import { crsType } from "../Enum/typeEnum";
|
|
2
12
|
import { IDivGraphicOption } from "../base/baseOptionType";
|
|
3
13
|
import Overlay from "ol/Overlay";
|
|
@@ -34,11 +44,10 @@ export declare class DivGraphic extends Overlay {
|
|
|
34
44
|
off(type: string | number, fn: any): this;
|
|
35
45
|
/**
|
|
36
46
|
* 绑定一个只执行一次的事件
|
|
37
|
-
*
|
|
38
|
-
* @param {String} type 事件类型
|
|
47
|
+
* @param {string} type 事件类型
|
|
39
48
|
* @param {Function} fn 事件处理函数
|
|
40
|
-
* @param {
|
|
41
|
-
* @returns 当前实例对象
|
|
49
|
+
* @param {object} scope 要为事件处理函数绑定的执行上下文
|
|
50
|
+
* @returns {object} 当前实例对象
|
|
42
51
|
*/
|
|
43
52
|
onec(type: string | number, fn: Function, scope: any): this;
|
|
44
53
|
trigger(eName: string | number | symbol, params: any): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Feature from "ol/Feature";
|
|
2
2
|
import { IFeatureAttribute, IFillOption, IGraphicLayerOption, IGraphicOption, IImageStyle, IStrokeOption, ITextOption, ITooltipInfo } from "../base/baseOptionType";
|
|
3
3
|
import { proj } from "../proj4/proj";
|
|
4
|
+
import { Coordinate } from "ol/coordinate";
|
|
4
5
|
export declare class baseGraphic extends Feature {
|
|
5
6
|
protected option: IGraphicOption;
|
|
6
7
|
protected Proj: proj;
|
|
@@ -23,19 +24,21 @@ export declare class baseGraphic extends Feature {
|
|
|
23
24
|
private chaikin_smooth_polygon;
|
|
24
25
|
/**
|
|
25
26
|
* 平滑方法
|
|
26
|
-
* @param coordinate 坐标
|
|
27
|
-
* @param param 参数
|
|
28
|
-
* @
|
|
27
|
+
* @param {number[]| Coordinate[]} coordinate 坐标
|
|
28
|
+
* @param {number} param 参数
|
|
29
|
+
* @param {boolean} isLine
|
|
30
|
+
* @returns {number[]}
|
|
29
31
|
*/
|
|
30
|
-
smoothFunc(coordinate:
|
|
32
|
+
smoothFunc(coordinate: number[] | Coordinate[], param?: number, isLine?: boolean): any;
|
|
31
33
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
* 平滑曲线
|
|
35
|
+
* @param {number} param 越大越平滑
|
|
36
|
+
* @param {boolean} isLine
|
|
37
|
+
*/
|
|
35
38
|
setSmooth(param?: number, isLine?: boolean): void;
|
|
36
39
|
/**
|
|
37
40
|
* 设置图形文字样式
|
|
38
|
-
* @param ITextOption
|
|
41
|
+
* @param {ITextOption} textStyleOption
|
|
39
42
|
* @example
|
|
40
43
|
* setTextStyle({
|
|
41
44
|
font: "14px Microsoft YaHei",
|
|
@@ -59,60 +62,60 @@ export declare class baseGraphic extends Feature {
|
|
|
59
62
|
offsetY: -10,
|
|
60
63
|
textBaseline: "bottom",
|
|
61
64
|
})
|
|
62
|
-
|
|
65
|
+
*/
|
|
63
66
|
setTextStyle(textStyleOption: ITextOption): void;
|
|
64
67
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
68
|
+
* 设置三角点样式
|
|
69
|
+
* @param {IImageStyle} ImageStyleOption
|
|
70
|
+
* @example
|
|
71
|
+
* setTrianglePointStyle({
|
|
72
|
+
scale: 1, //比例
|
|
73
|
+
radius: 5, //大小
|
|
74
|
+
fill: {
|
|
75
|
+
color: "rgba(255, 0, 0,1)", // 填充色
|
|
76
|
+
},
|
|
77
|
+
stroke: {
|
|
78
|
+
color: "rgba(255, 255, 0,1)", // 边框色
|
|
79
|
+
width: 1, //宽度
|
|
80
|
+
|
|
81
|
+
},
|
|
82
|
+
})
|
|
83
|
+
*/
|
|
81
84
|
setTrianglePointStyle(ImageStyleOption: IImageStyle): void;
|
|
82
85
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
86
|
+
* 设置圆点样式
|
|
87
|
+
* @param {IImageStyle} ImageStyleOption
|
|
88
|
+
* @example
|
|
89
|
+
* setCirclePointStyle({
|
|
90
|
+
scale: 1, //比例
|
|
91
|
+
radius: 5, //大小
|
|
92
|
+
fill: {
|
|
93
|
+
color: "rgba(255, 0, 0,1)", // 填充色
|
|
94
|
+
},
|
|
95
|
+
stroke: {
|
|
96
|
+
color: "rgba(255, 255, 0,1)", // 边框色
|
|
97
|
+
width: 1, //宽度
|
|
98
|
+
|
|
99
|
+
},
|
|
100
|
+
})
|
|
101
|
+
*/
|
|
99
102
|
setCirclePointStyle(ImageStyleOption: IImageStyle): void;
|
|
100
103
|
/**
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
* 设置边框简单模式样式
|
|
105
|
+
* @param {IStrokeOption} strokeStyleOption
|
|
106
|
+
* @example
|
|
107
|
+
* setStrokeSimpleStyle({
|
|
105
108
|
color: "rgba(255, 255, 255,1)", //"#fff",
|
|
106
109
|
width: 2, //2,
|
|
107
110
|
lineDash:[10,10] 或null
|
|
108
111
|
})
|
|
109
|
-
|
|
112
|
+
*/
|
|
110
113
|
setStrokeSimpleStyle(strokeStyleOption: IStrokeOption): void;
|
|
111
114
|
/**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
* 设置边框图案填充模式样式,pattern与image 二选一,不用的需undefined,同时配置优先pattern
|
|
116
|
+
* @param {IStrokeOption} strokeStyleOption
|
|
117
|
+
* @example
|
|
118
|
+
* setStrokePatternStyle({
|
|
116
119
|
pattern: undefined,图案Enum:mirage2d.DataType.featureStyleType.caps
|
|
117
120
|
// image: undefined,
|
|
118
121
|
color: "rgba(255, 255, 0,1)",//背景色
|
|
@@ -126,18 +129,18 @@ export declare class baseGraphic extends Feature {
|
|
|
126
129
|
spacing: 10,
|
|
127
130
|
angle: 0
|
|
128
131
|
})
|
|
129
|
-
|
|
132
|
+
*/
|
|
130
133
|
setStrokePatternStyle(strokeStyleOption: IStrokeOption): void;
|
|
131
134
|
/**
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
* 设置填充简单模式样式 ,从图片模式转到普通模式时,需注意等图片加载完成后才可设置
|
|
136
|
+
* @param {string} color
|
|
137
|
+
* @example
|
|
138
|
+
* setFillColor("rgba(255, 255, 255,1)")//"#fff"
|
|
139
|
+
*/
|
|
137
140
|
setFillColor(color: string): void;
|
|
138
141
|
/**
|
|
139
142
|
* 设置多边形图案填充模式样式,pattern与image 二选一,不用的需undefined,同时配置优先pattern
|
|
140
|
-
* @param fillStyleOption
|
|
143
|
+
* @param {IFillOption} fillStyleOption
|
|
141
144
|
* @example
|
|
142
145
|
* setFillPatternStyle({
|
|
143
146
|
pattern: undefined,图案Enum:mirage2d.DataType.featureStyleType.caps
|
|
@@ -153,14 +156,14 @@ export declare class baseGraphic extends Feature {
|
|
|
153
156
|
spacing: 10,
|
|
154
157
|
angle: 0
|
|
155
158
|
})
|
|
156
|
-
|
|
159
|
+
*/
|
|
157
160
|
setFillPatternStyle(fillStyleOption: IFillOption): void;
|
|
158
161
|
/**
|
|
159
162
|
* 设置多边形图片填充模式样式,初始设置时当pattern==null或undefined 且image有值才能生效
|
|
160
|
-
* @param
|
|
163
|
+
* @param {string} imageUrl
|
|
161
164
|
* @example
|
|
162
165
|
* setFillImageStyle(imageurl)
|
|
163
|
-
|
|
166
|
+
*/
|
|
164
167
|
setFillImageStyle(imageUrl: string): void;
|
|
165
168
|
setZIndex(zindex: number): void;
|
|
166
169
|
getCoordinates(projection?: string): any;
|
package/dist/graphic/index.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-07-19 10:33:41
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-05-05 13:02:28
|
|
6
|
+
* @FilePath: \Map2D\src\graphic\index.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
export { LabelGraphic } from "./label";
|
|
2
12
|
export { PointGraphic } from "./point";
|
|
3
13
|
export { ImagePointGraphic } from "./imagePoint";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-01-15 14:36:39
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-04-07 17:51:13
|
|
6
|
+
* @Description: 功能
|
|
7
|
+
*/
|
|
1
8
|
export { MirageMap as Map } from "./Layer/XMap";
|
|
2
9
|
export * as Layer from "./Layer/index";
|
|
3
10
|
export * as Graphic from "./graphic/index";
|
package/dist/lib/includeLibs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @
|
|
2
|
+
* @author: xd
|
|
3
3
|
* @Date: 2022-07-18 13:07:26
|
|
4
4
|
* @LastEditors: xd
|
|
5
5
|
* @LastEditTime: 2022-08-10 18:42:37
|
|
6
6
|
* @FilePath: \Map2D\public\lib\includeLibs.js
|
|
7
|
-
* @Description:
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* 第3方公共类库配置文件
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
* @copyright 幻景科技 mirage2d.cn
|
|
15
15
|
* @author xd 2022-8-2
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
var configLibs = {
|
|
18
18
|
/// ///////////////////////Mars2D地图渲染相关库////////////////////////
|
|
19
|
-
|
|
19
|
+
gifler: [
|
|
20
20
|
// gif插件
|
|
21
21
|
"gifler/gifler.js" // 必须,加载gif图层时需要
|
|
22
22
|
],
|
|
23
|
-
|
|
23
|
+
jsts: [
|
|
24
24
|
// gif插件
|
|
25
25
|
"jsts/dist/jsts.min.js" // 必须,加载gif图层时需要
|
|
26
26
|
],
|
|
27
|
-
|
|
27
|
+
contextmenu: [
|
|
28
28
|
// gif插件
|
|
29
29
|
"contextmenu/dist/ol-contextmenu.js" // 必须,加载gif图层时需要
|
|
30
|
-
]
|
|
30
|
+
]
|
|
31
31
|
/// ///////////////////////其他地图渲染相关库////////////////////////
|
|
32
32
|
// turf: ["turf/turf.min.js"],
|
|
33
33
|
// echarts: ["echarts/echarts.min.js", "echarts/dark.js"],
|
|
@@ -38,14 +38,13 @@
|
|
|
38
38
|
// kriging: ["kriging/kriging.min.js"]
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
42
41
|
//内部处理方法
|
|
43
|
-
;
|
|
44
|
-
var r = new RegExp(
|
|
45
|
-
s = document.getElementsByTagName(
|
|
42
|
+
;(function () {
|
|
43
|
+
var r = new RegExp("(^|(.*?\\/))(includeLibs.js)(\\?|$)"),
|
|
44
|
+
s = document.getElementsByTagName("script"),
|
|
46
45
|
targetScript
|
|
47
46
|
for (var i = 0; i < s.length; i++) {
|
|
48
|
-
var src = s[i].getAttribute(
|
|
47
|
+
var src = s[i].getAttribute("src")
|
|
49
48
|
if (src) {
|
|
50
49
|
var m = src.match(r)
|
|
51
50
|
if (m) {
|
|
@@ -56,9 +55,9 @@
|
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
// cssExpr 用于判断资源是否是css
|
|
59
|
-
var cssExpr = new RegExp(
|
|
58
|
+
var cssExpr = new RegExp("\\.css")
|
|
60
59
|
|
|
61
|
-
function inputLibs
|
|
60
|
+
function inputLibs(list, baseUrl) {
|
|
62
61
|
if (list == null || list.length === 0) {
|
|
63
62
|
return
|
|
64
63
|
}
|
|
@@ -73,18 +72,18 @@
|
|
|
73
72
|
var css = '<link rel="stylesheet" href="' + url + '">'
|
|
74
73
|
document.writeln(css)
|
|
75
74
|
} else {
|
|
76
|
-
var script = '<script type="text/javascript" src="' + url + '"><' +
|
|
75
|
+
var script = '<script type="text/javascript" src="' + url + '"><' + "/script>"
|
|
77
76
|
document.writeln(script)
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
80
|
|
|
82
81
|
//加载类库资源文件
|
|
83
|
-
function load
|
|
84
|
-
var arrInclude = (targetScript.getAttribute(
|
|
85
|
-
var libpath = targetScript.getAttribute(
|
|
86
|
-
if (libpath.lastIndexOf(
|
|
87
|
-
libpath +=
|
|
82
|
+
function load() {
|
|
83
|
+
var arrInclude = (targetScript.getAttribute("include") || "").split(",")
|
|
84
|
+
var libpath = targetScript.getAttribute("libpath") || ""
|
|
85
|
+
if (libpath.lastIndexOf("/") !== libpath.length - 1) {
|
|
86
|
+
libpath += "/"
|
|
88
87
|
}
|
|
89
88
|
|
|
90
89
|
var keys = {}
|
|
@@ -96,10 +95,10 @@
|
|
|
96
95
|
continue
|
|
97
96
|
}
|
|
98
97
|
keys[key] = true
|
|
99
|
-
|
|
98
|
+
|
|
100
99
|
inputLibs(configLibs[key], libpath)
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
|
|
104
103
|
load()
|
|
105
|
-
})()
|
|
104
|
+
})()
|