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
package/dist/Tools/measure.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2021-12-27 21:07:38
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2022-10-10 20:26:33
|
|
6
|
+
* @Description: 功能
|
|
7
|
+
*/
|
|
1
8
|
import { Style } from "ol/style";
|
|
2
9
|
import { Vector as VectorLayer } from "ol/layer";
|
|
3
10
|
import { baseClass } from "../base/baseClass";
|
package/dist/Tools/secret.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2021-12-18 10:21:19
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-05-25 15:34:16
|
|
6
|
+
* @Description: 数据加密解密
|
|
7
|
+
*/
|
|
1
8
|
export declare class Secret {
|
|
2
|
-
constructor();
|
|
3
9
|
getMessage(): void;
|
|
4
10
|
scanApk(apkinfo: string, ver: string): boolean;
|
|
5
11
|
getVersionsInfo(ver: string): {
|
|
@@ -17,15 +23,15 @@ export declare class Secret {
|
|
|
17
23
|
Copyright: string;
|
|
18
24
|
};
|
|
19
25
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @param {
|
|
22
|
-
* @
|
|
26
|
+
* :加密
|
|
27
|
+
* @param {string} word
|
|
28
|
+
* @returns {*}
|
|
23
29
|
*/
|
|
24
30
|
private Encrypt1;
|
|
25
31
|
/**
|
|
26
|
-
*
|
|
32
|
+
* 解密
|
|
27
33
|
* @param {string} word
|
|
28
|
-
* @
|
|
34
|
+
* @returns {*}
|
|
29
35
|
*/
|
|
30
36
|
private Decrypt1;
|
|
31
37
|
}
|
package/dist/Tools/toolbox.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import Feature from "ol/Feature";
|
|
2
2
|
import { Geometry } from "ol/geom";
|
|
3
3
|
export declare class toolbox {
|
|
4
|
-
constructor();
|
|
5
4
|
static uuid15(): any;
|
|
6
5
|
/**
|
|
7
|
-
*
|
|
6
|
+
* : 检查是否css颜色
|
|
8
7
|
* @param {*} bgVal
|
|
9
|
-
* @
|
|
8
|
+
* @returns {*}
|
|
10
9
|
*/
|
|
11
10
|
static CheckIsColor(bgVal: any): any;
|
|
12
11
|
static getDefaultImageFillStyle(): any[];
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @date: Do not edit
|
|
4
|
+
* @lastEditors: xd
|
|
5
|
+
* @lastEditTime: Do not edit
|
|
6
|
+
* @filePath: Do not edit
|
|
7
|
+
* @description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2023 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* @author: xd
|
|
13
|
+
* @Date: 2022-10-11 12:01:34
|
|
14
|
+
* @LastEditors: xd
|
|
15
|
+
* @LastEditTime: 2022-10-22 13:40:00
|
|
16
|
+
* @FilePath: \Map2D\src\Tools\util\format.ts
|
|
17
|
+
* @Description:
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
20
|
+
*/
|
|
1
21
|
export declare function ToDegree(degree?: number, minute?: number, second?: number, len?: number): string;
|
|
2
22
|
export declare function ToDegreeMinuteSecond(val: number | string): {
|
|
3
23
|
degree: number;
|
|
@@ -7,7 +27,7 @@ export declare function ToDegreeMinuteSecond(val: number | string): {
|
|
|
7
27
|
export declare function formatDistance(m: any): string;
|
|
8
28
|
export declare function SecondToHHMMSS(value: any): string;
|
|
9
29
|
/**
|
|
10
|
-
*
|
|
30
|
+
* 参数拼接
|
|
11
31
|
* @param {object} obj 只支持非嵌套的对象
|
|
12
32
|
* @returns {string}
|
|
13
33
|
* @author xd 2020-1-15
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-09-05 09:47:34
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2022-10-13 11:48:40
|
|
6
|
+
* @FilePath: \Map2D\src\Tools\util\index.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
export { UIsUtil as isutil } from "./isutil";
|
|
2
12
|
export { UJson as json } from "./json";
|
|
3
13
|
export * as format from "./format";
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-09-05 09:35:41
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2022-09-05 09:44:13
|
|
6
|
+
* @FilePath: \Map2D\src\Tools\util\isutil.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
export declare class UIsUtil {
|
|
2
12
|
static BUILTIN_OBJECT: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
"[object Function]": boolean;
|
|
14
|
+
"[object RegExp]": boolean;
|
|
15
|
+
"[object Date]": boolean;
|
|
16
|
+
"[object Error]": boolean;
|
|
17
|
+
"[object CanvasGradient]": boolean;
|
|
18
|
+
"[object CanvasPattern]": boolean;
|
|
19
|
+
"[object Image]": boolean;
|
|
20
|
+
"[object Canvas]": boolean;
|
|
11
21
|
};
|
|
12
22
|
static TYPED_ARRAY: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
"[object Int8Array]": boolean;
|
|
24
|
+
"[object Uint8Array]": boolean;
|
|
25
|
+
"[object Uint8ClampedArray]": boolean;
|
|
26
|
+
"[object Int16Array]": boolean;
|
|
27
|
+
"[object Uint16Array]": boolean;
|
|
28
|
+
"[object Int32Array]": boolean;
|
|
29
|
+
"[object Uint32Array]": boolean;
|
|
30
|
+
"[object Float32Array]": boolean;
|
|
31
|
+
"[object Float64Array]": boolean;
|
|
22
32
|
};
|
|
23
33
|
static primitiveKey: string;
|
|
24
34
|
static objToString: () => string;
|
|
@@ -1 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-10-13 11:38:43
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2022-10-13 13:16:01
|
|
6
|
+
* @FilePath: \Map2D\src\Tools\util\tools.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
export declare function fetchJson(url: string): Promise<any>;
|
package/dist/base/EventType.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-01-13 20:39:42
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2022-10-10 20:11:57
|
|
6
|
+
* @Description: 功能
|
|
7
|
+
*/
|
|
1
8
|
export { featureType } from "./FeatureEventType";
|
|
2
9
|
export { XMapEventType } from "./MapEventType";
|
|
3
10
|
export { LayerEventType } from "./LayerEventType";
|
package/dist/base/base.d.ts
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
import { baseClass } from "./baseClass";
|
|
2
|
+
/**
|
|
3
|
+
* 基础baseClass
|
|
4
|
+
* @extends baseClass
|
|
5
|
+
*/
|
|
2
6
|
export declare class base extends baseClass {
|
|
7
|
+
/**
|
|
8
|
+
* 实例化
|
|
9
|
+
*/
|
|
3
10
|
constructor();
|
|
4
|
-
|
|
11
|
+
/**
|
|
12
|
+
* 获取json.
|
|
13
|
+
* @param {string} urlstr - 输入的网址.
|
|
14
|
+
* @returns {any} 返回json格式数据.
|
|
15
|
+
*/
|
|
16
|
+
getJSON(urlstr: string): any;
|
|
17
|
+
/**
|
|
18
|
+
* 获取文件
|
|
19
|
+
* @param {string | URL} url - 输入的网址.
|
|
20
|
+
* @param {string} contenttype - 文件类型.
|
|
21
|
+
* @returns {any} 返回json格式数据.
|
|
22
|
+
*/
|
|
5
23
|
getFile(url: string | URL, contenttype: string): any;
|
|
24
|
+
/**
|
|
25
|
+
* 转换坐标到3857坐标
|
|
26
|
+
* @param {string} wkid - 输入的网址.
|
|
27
|
+
* @param {number[]} Coordinates - 文件类型.
|
|
28
|
+
* @returns {any} 返回json格式数据.
|
|
29
|
+
*/
|
|
6
30
|
ConvertCoordinatesTo3857(wkid: string, Coordinates: number[]): number[];
|
|
7
31
|
ConvertCoordinatesTo4326(wkid: string, Coordinates: any): any;
|
|
8
32
|
formatJsonTo3857(GeoJson: any): any;
|
|
@@ -11,7 +35,10 @@ export declare class base extends baseClass {
|
|
|
11
35
|
}>;
|
|
12
36
|
formatJsonToPoint(GeoJson: any): any;
|
|
13
37
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
38
|
+
* 将十六进制的颜色值转为RGB格式
|
|
39
|
+
* @param {string} sHex - 十六进制的颜色值.
|
|
40
|
+
* @param {string} alpha -透明度.
|
|
41
|
+
* @returns {string} rgba(r,g,b,a).
|
|
42
|
+
*/
|
|
16
43
|
colorRgba(sHex: string, alpha: string): string;
|
|
17
44
|
}
|
package/dist/base/baseClass.d.ts
CHANGED
|
@@ -1,16 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-10-10 20:02:02
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-06-06 14:42:45
|
|
6
|
+
* @FilePath: \Map2D\src\base\baseClass.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2023 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* 基类.
|
|
13
|
+
* @class
|
|
14
|
+
*/
|
|
1
15
|
export declare class baseClass {
|
|
16
|
+
/** 容器 */
|
|
2
17
|
handlers: {};
|
|
18
|
+
/**
|
|
19
|
+
* Creates baseClass instance.
|
|
20
|
+
*/
|
|
3
21
|
constructor();
|
|
4
22
|
_on(type: string | number, fn: any): this;
|
|
5
23
|
off(type: string | number, fn: any): this;
|
|
6
24
|
/**
|
|
7
25
|
* 绑定一个只执行一次的事件
|
|
8
|
-
*
|
|
9
|
-
* @param {String} type 事件类型
|
|
26
|
+
* @param {string} type 事件类型
|
|
10
27
|
* @param {Function} fn 事件处理函数
|
|
11
|
-
* @param {
|
|
12
|
-
* @returns 当前实例对象
|
|
28
|
+
* @param {object} scope 要为事件处理函数绑定的执行上下文
|
|
29
|
+
* @returns {any} 当前实例对象
|
|
13
30
|
*/
|
|
14
|
-
onec(type: string | number, fn: Function, scope: any):
|
|
31
|
+
onec(type: string | number, fn: Function, scope: any): any;
|
|
15
32
|
trigger(eName: string | number | symbol, params: any): void;
|
|
16
33
|
}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-07-21 17:38:04
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-06-02 12:57:54
|
|
6
|
+
* @FilePath: \Map2D\src\base\baseGraphicLayer.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
1
11
|
import { baseLayer } from "./baseLayer";
|
|
2
12
|
import VectorSource from "ol/source/Vector";
|
|
3
13
|
import { IFeatureAttribute, IGraphicLayerOption, IlevelColor, ITooltipInfo } from "./baseOptionType";
|
|
@@ -25,26 +35,26 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
25
35
|
appendContextmenu(menu: any): void;
|
|
26
36
|
protected _setFeatureContextmenu(feature: any, contextmenu: any): void;
|
|
27
37
|
/**
|
|
28
|
-
*
|
|
38
|
+
* : 显示tile
|
|
29
39
|
* @param {string} dataType dataType字段属性
|
|
30
40
|
* @param {boolean} isShow 显示/关闭
|
|
31
41
|
* @param {string} showFieldName name 显示字段名 默认name
|
|
32
42
|
*/
|
|
33
43
|
showTitle(dataType: string, isShow: boolean, showFieldName?: string): void;
|
|
34
44
|
/**
|
|
35
|
-
*
|
|
45
|
+
* : 显示tile
|
|
36
46
|
* @param {string} classname classname字段属性
|
|
37
47
|
* @param {boolean} isShow 显示/关闭
|
|
38
48
|
* @param {string} showFieldName name 显示字段名 默认name
|
|
39
49
|
*/
|
|
40
50
|
showTitleByClassname(classname: string, isShow: boolean, showFieldName?: string): void;
|
|
41
51
|
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
* : 显示tile
|
|
53
|
+
* @param {string} fieldname 字段名
|
|
54
|
+
* @param {string} fieldval 字段值
|
|
55
|
+
* @param {boolean} isShow 显示/关闭
|
|
56
|
+
* @param {string} showFieldName name 显示字段名 默认name
|
|
57
|
+
*/
|
|
48
58
|
showTitleByField(fieldname: string, fieldval: string, isShow: boolean, showFieldName?: string): void;
|
|
49
59
|
_bindPoupEvent(): void;
|
|
50
60
|
bindPopup(popupInfo?: Array<ITooltipInfo> | string, option?: {
|
|
@@ -64,69 +74,73 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
64
74
|
protected _showTooltip2(feature: Feature<Geometry>, data: string, option: IGraphicLayerOption["tooltipOption"]): void;
|
|
65
75
|
closeTooltip(): void;
|
|
66
76
|
/**
|
|
67
|
-
*
|
|
77
|
+
* : 添加GeoJSON数据,需要数据库样式匹配
|
|
68
78
|
* @param {string} classname 图层编号
|
|
69
79
|
* @param {any} GeoJson 标准GeoJson格式
|
|
70
80
|
*/
|
|
71
81
|
addGeoJson(classname: string, GeoJson: any): void;
|
|
72
82
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
* : 添加GeoJSON数据,多边形将转为点格式
|
|
84
|
+
* @param {string} classname 图层编号
|
|
85
|
+
* @param {any} GeoJson 标准GeoJson格式
|
|
86
|
+
*/
|
|
77
87
|
addGeoJsonPoint(classname: string, GeoJson: any): void;
|
|
78
88
|
/**
|
|
79
|
-
*
|
|
89
|
+
* 转换geojson到Features
|
|
80
90
|
* @param {any} GeoJson 标准GeoJson格式
|
|
91
|
+
* @returns {any}
|
|
81
92
|
*/
|
|
82
93
|
convertGeoJsontoFeatures(GeoJson: any): any;
|
|
83
94
|
/**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
* :设置要素属性
|
|
96
|
+
* @param {string} classname 分类名
|
|
97
|
+
* @param {Array<Feature<Geometry>>} featuresList 要素数组
|
|
98
|
+
* @param {Array<IFeatureAttribute>} attribute 要素属性数组
|
|
99
|
+
* @param {Function} callback 回调函数
|
|
100
|
+
*/
|
|
89
101
|
addFeatures(classname: string, featuresList: Array<Feature<Geometry>>, attribute?: IFeatureAttribute | any, callback?: Function): void;
|
|
90
102
|
private _getFeatureAttribute;
|
|
91
103
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
104
|
+
* 设置要素属性
|
|
105
|
+
* @param {string} classname 分类名
|
|
106
|
+
* @param {Feature<Geometry>} feature 要素
|
|
107
|
+
* @param {Array<IFeatureAttribute>} attribute 要素属性数组
|
|
108
|
+
* @param {Function} callback 回调函数
|
|
109
|
+
*/
|
|
97
110
|
addFeature(classname: string, feature: Feature<Geometry>, attribute?: IFeatureAttribute | any, callback?: Function): void;
|
|
98
111
|
/**
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
112
|
+
* 设置要素属性
|
|
113
|
+
* @param {IFeatureAttribute| any} attribute 要素属性数组
|
|
114
|
+
*/
|
|
102
115
|
setFeaturesAttribute(attribute: IFeatureAttribute | any): void;
|
|
103
116
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
117
|
+
* :设置要素属性
|
|
118
|
+
* @param {string}classname
|
|
119
|
+
* @param {IFeatureAttribute| any} attribute 要素属性数组
|
|
120
|
+
*/
|
|
107
121
|
setFeaturesAttributeByClassName(classname: string, attribute: IFeatureAttribute | any): void;
|
|
108
122
|
/**
|
|
109
|
-
*
|
|
123
|
+
* :设置要素属性
|
|
110
124
|
* @param {string} uuid 要素uuid
|
|
111
|
-
* @param {Array<IFeatureAttribute>} 要素属性数组
|
|
125
|
+
* @param {Array<IFeatureAttribute>} attribute 要素属性数组
|
|
112
126
|
*/
|
|
113
127
|
setFeatureAttribute(uuid: string, attribute: IFeatureAttribute | any): void;
|
|
114
128
|
/**
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
129
|
+
* 返回图层所有要素
|
|
130
|
+
* @returns {Feature<Geometry>[]} 返回要素数组
|
|
131
|
+
*/
|
|
118
132
|
getFeaturesAll(): Feature<Geometry>[];
|
|
119
133
|
/**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
134
|
+
* 按字段名、属性查询
|
|
135
|
+
* @param {*} fieldName 字段名
|
|
136
|
+
* @param {*} fieldVal 字段值
|
|
137
|
+
* @returns {*} 返回要素数组
|
|
138
|
+
*/
|
|
125
139
|
getFeaturesByFieldName(fieldName: any, fieldVal: any): any;
|
|
126
140
|
/**
|
|
127
|
-
*
|
|
141
|
+
* 按classname查询
|
|
128
142
|
* @param {*} classname 分类名
|
|
129
|
-
* @
|
|
143
|
+
* @returns {*} 返回要素数组
|
|
130
144
|
*/
|
|
131
145
|
getFeaturesByClassName(classname: any): any;
|
|
132
146
|
getFeatures(name: any): any;
|
|
@@ -137,24 +151,27 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
137
151
|
* @param {string} classname
|
|
138
152
|
*/
|
|
139
153
|
removeFeature(uuid: string | Feature<Geometry>): void;
|
|
140
|
-
|
|
141
|
-
*
|
|
154
|
+
/**
|
|
155
|
+
* 删除GeoJSON数据
|
|
142
156
|
* @param {string} classname
|
|
143
157
|
*/
|
|
144
|
-
removeFeatures(classname:
|
|
158
|
+
removeFeatures(classname: string): void;
|
|
145
159
|
/**删除GeoJSON数据
|
|
146
160
|
* @description:
|
|
147
161
|
* @param {any} json
|
|
148
162
|
*/
|
|
149
163
|
removeFeaturesByJson(json: any): void;
|
|
150
164
|
/**
|
|
151
|
-
*
|
|
165
|
+
* 替换{}字段
|
|
166
|
+
* @param {string} str
|
|
167
|
+
* @returns {string}
|
|
152
168
|
*/
|
|
153
169
|
private replaceField;
|
|
154
|
-
/**
|
|
170
|
+
/**
|
|
171
|
+
* 设置所有要素样式
|
|
155
172
|
* @description:
|
|
156
173
|
* @param {any} styleOptions
|
|
157
|
-
* @param {
|
|
174
|
+
* @param {Function} callback 回调函数,可选 回调会返回每个feature的getProperties()属性,根据属性使用回调函数设置每个要素的styleOptions样式
|
|
158
175
|
* @example styleOptions 内容
|
|
159
176
|
* {
|
|
160
177
|
Font: "12px Microsoft YaHei",
|
|
@@ -173,14 +190,15 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
173
190
|
*/
|
|
174
191
|
setSymbol(styleOptions: any, callback?: Function): void;
|
|
175
192
|
/**
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
193
|
+
* 设置要素分级颜色样式,按字段名及字段值匹配设置
|
|
194
|
+
* @param {object} levelOption json参数
|
|
195
|
+
* @param {string} levelOption.classname 参与分级的要素分组 classname
|
|
196
|
+
* @param {string} levelOption.attributeName 参与分级的要素字段名
|
|
197
|
+
* @param {boolean} levelOption.autolevel 是否自动分级,自动分级时默认5级颜色
|
|
198
|
+
* @param {Array<IlevelColor>} levelOption.levelColor 分级设置
|
|
199
|
+
* @returns { IlevelColor[]}
|
|
200
|
+
* @example
|
|
201
|
+
* levelColor:[
|
|
184
202
|
{
|
|
185
203
|
maxnum: 0, // 分级最大值
|
|
186
204
|
fillcolor: "rgba(255,255,255,0.1)",
|
|
@@ -194,7 +212,7 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
194
212
|
strokewidth: 1
|
|
195
213
|
}
|
|
196
214
|
]
|
|
197
|
-
|
|
215
|
+
*/
|
|
198
216
|
setSymbolLevelColor(levelOption: {
|
|
199
217
|
classname: string;
|
|
200
218
|
attributeName: string;
|
|
@@ -202,12 +220,12 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
202
220
|
levelColor?: Array<IlevelColor>;
|
|
203
221
|
}): IlevelColor[];
|
|
204
222
|
/**
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
223
|
+
* 根据classname字段设置所有要素样式,按字段名及字段值匹配设置
|
|
224
|
+
* @param {string} classname
|
|
225
|
+
* @param {any[]} styleOptions
|
|
226
|
+
* @param {Function} callback 回调函数,可选 回调会返回每个feature的getProperties()属性,根据属性使用回调函数设置每个要素的styleOptions样式
|
|
227
|
+
* @example styleOptions 是一个json结构
|
|
228
|
+
* {
|
|
211
229
|
Font: "12px Microsoft YaHei",
|
|
212
230
|
FontColor: "#8B4513",
|
|
213
231
|
FontStrokeColor: "#fff",
|
|
@@ -221,12 +239,13 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
221
239
|
radius: 10,
|
|
222
240
|
text: ""//可以用{字段名}格式化显示字段
|
|
223
241
|
}
|
|
224
|
-
|
|
242
|
+
*/
|
|
225
243
|
setSymbolByClassname(classname: any, styleOptions: any, callback?: Function): void;
|
|
226
|
-
/**
|
|
227
|
-
*
|
|
228
|
-
* @param {any[]}
|
|
229
|
-
* @param
|
|
244
|
+
/**
|
|
245
|
+
* 根据features设置所有要素样式,按字段名及字段值匹配设置
|
|
246
|
+
* @param {any[]} features
|
|
247
|
+
* @param {any[]} styleOptions
|
|
248
|
+
* @param {Function} callback 回调函数,可选 回调会返回每个feature的getProperties()属性,根据属性使用回调函数设置每个要素的styleOptions样式
|
|
230
249
|
* @example styleOptions 是一个json结构
|
|
231
250
|
* {
|
|
232
251
|
Font: "12px Microsoft YaHei",
|
|
@@ -244,7 +263,8 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
244
263
|
}
|
|
245
264
|
*/
|
|
246
265
|
setSymbolByFeatures(features: any, styleOptions: any, callback?: Function): void;
|
|
247
|
-
/**
|
|
266
|
+
/**
|
|
267
|
+
* 设置所有要素样式,按字段名及字段值匹配设置
|
|
248
268
|
* @description:
|
|
249
269
|
* @param {any[]} styleClassOptions
|
|
250
270
|
* @example styleClassOptions 是一个数组结构
|
|
@@ -268,7 +288,8 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
268
288
|
}]
|
|
269
289
|
*/
|
|
270
290
|
setSymbolByStyleClass(styleClassOptions: any): void;
|
|
271
|
-
/**
|
|
291
|
+
/**
|
|
292
|
+
* 设置所有要素样式,根据classname字段设置
|
|
272
293
|
* @description:
|
|
273
294
|
* @param {string} classname
|
|
274
295
|
* @param {any[]} styleClassOptions
|
|
@@ -301,13 +322,8 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
301
322
|
setFeaturesTileByJson(dataTypeVal: any, isShow: any): void;
|
|
302
323
|
clear(): void;
|
|
303
324
|
/**
|
|
304
|
-
*
|
|
305
|
-
* @param {
|
|
306
|
-
* @param {object} graphicAttribute 属性结合
|
|
307
|
-
* @param {string} [graphicAttribute.name=""] graphicAttribute.name,默认""
|
|
308
|
-
* @param {string} [graphicAttribute.dataType="未定义"] graphicAttribute.dataType
|
|
309
|
-
* @param {Function} [graphicAttribute.success=undefined] graphicAttribute.dataType
|
|
310
|
-
* @api
|
|
325
|
+
* 绘制图形
|
|
326
|
+
* @param {object} option 属性结合
|
|
311
327
|
*/
|
|
312
328
|
startDraw(option: any): void;
|
|
313
329
|
changeGraphicData(option: any, drawFeature: any): void;
|
package/dist/base/baseLayer.d.ts
CHANGED
package/dist/base/baseMap.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @author: xd
|
|
3
|
+
* @Date: 2022-08-02 15:06:38
|
|
4
|
+
* @LastEditors: xd
|
|
5
|
+
* @LastEditTime: 2023-06-02 16:31:39
|
|
6
|
+
* @FilePath: \Map2D\src\base\baseOptionType.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2022 by xd, All Rights Reserved.
|
|
10
|
+
*/
|
|
11
|
+
import { Style } from "ol/style";
|
|
2
12
|
import { Coordinate } from "ol/coordinate";
|
|
3
13
|
import { Positioning } from "ol/Overlay";
|
|
4
14
|
import { crsType, featuretype } from "../Enum/typeEnum";
|
|
@@ -343,10 +353,10 @@ export interface IDivGraphicOption {
|
|
|
343
353
|
attribute?: any;
|
|
344
354
|
}
|
|
345
355
|
/**
|
|
346
|
-
* @description: 多窗口参数
|
|
347
|
-
* @param {string | HTMLElement} target 容器
|
|
348
|
-
* @param {string} layername 图层名
|
|
349
|
-
*/
|
|
356
|
+
* @description: 多窗口参数
|
|
357
|
+
* @param {string | HTMLElement} target 容器
|
|
358
|
+
* @param {string} layername 图层名
|
|
359
|
+
*/
|
|
350
360
|
export interface IMapViewOption {
|
|
351
361
|
target?: string | HTMLElement;
|
|
352
362
|
baselayer?: string;
|