mirage2d 1.2.46 → 1.2.48
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/tileLayer/PbfLayer.d.ts +3 -1
- package/dist/Tools/defaultStyle.d.ts +1 -0
- package/dist/Tools/toolbox.d.ts +35 -0
- package/dist/Tools/tykgGrid.d.ts +81 -0
- package/dist/Tools/zimu.d.ts +13 -0
- package/dist/base/base.d.ts +2 -0
- package/dist/base/baseGraphicLayer.d.ts +6 -0
- package/dist/base/baseOptionType.d.ts +47 -0
- package/dist/mirage2d.cjs.js +37 -37
- package/dist/mirage2d.umd.js +37 -37
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Style } from "ol/style";
|
|
1
2
|
import { baseLayer } from "../../base/baseLayer";
|
|
2
3
|
import { MirageMap } from "../XMap";
|
|
3
4
|
export declare class PbfLayer extends baseLayer {
|
|
@@ -17,6 +18,7 @@ export declare class PbfLayer extends baseLayer {
|
|
|
17
18
|
strokeWidth: number;
|
|
18
19
|
}];
|
|
19
20
|
});
|
|
20
|
-
tileUrlFunction(tileCoord: any, url: any):
|
|
21
|
+
tileUrlFunction(tileCoord: any, url: any): any;
|
|
21
22
|
appendTo(map: MirageMap): void;
|
|
23
|
+
createDynamicStyle(featureStyles: any): (feature: any) => Style;
|
|
22
24
|
}
|
|
@@ -189,6 +189,7 @@ export declare class MirageDefaultStyle {
|
|
|
189
189
|
strokeradius: number;
|
|
190
190
|
text: string;
|
|
191
191
|
};
|
|
192
|
+
static getTextCircleStyle(opt: any): Style[];
|
|
192
193
|
static getTipStyle(): Style;
|
|
193
194
|
static getIconStyle(opt: any): Style;
|
|
194
195
|
static getPointStyle(opt: any): Style;
|
package/dist/Tools/toolbox.d.ts
CHANGED
|
@@ -1,7 +1,42 @@
|
|
|
1
1
|
import Feature from "ol/Feature";
|
|
2
2
|
import { Geometry } from "ol/geom";
|
|
3
|
+
import { IGridOption } from "../base/baseOptionType";
|
|
3
4
|
export declare class toolbox {
|
|
4
5
|
static uuid15(): any;
|
|
6
|
+
/**
|
|
7
|
+
* @description: 网格参数
|
|
8
|
+
* @param {Array.<number>} [options.startPoint=[510367.2358, 2895576.008]] 起点坐标,西南角
|
|
9
|
+
* @param {number} [options.startNumberX=1] - startNumberX 东方向起始号 默认:1
|
|
10
|
+
* @param {number} [options.startNumberY=1] - startNumberY 北方向起始号 默认:1
|
|
11
|
+
* @param {number} [options.maxWidth=100] - maxWidth 最大宽度范围,东方向总长度 默认:100
|
|
12
|
+
* @param {number} [options.maxHeight=100] - maxHeight 最大高度范围,北方向总长度 默认:100
|
|
13
|
+
* @param {number} [options.onlyWidth=5] - onlyWidth, 单探方宽度 默认:5
|
|
14
|
+
* @param {number} [options.onlyHeight=5] - onlyHeight,单探方高度 默认:5
|
|
15
|
+
* @param {number} [options.quadrant=1] - quadrant, 象限【1,2,3,4】 默认:1
|
|
16
|
+
* @param {string} [options.fqChar=1] - fqChar,分区号 默认:""
|
|
17
|
+
* @param {string} [options.firstChar="A"] - firstChar,编号首字符,默认是T
|
|
18
|
+
* @param {string} [options.xChar=""] - xChar,x编号首字符 默认:""
|
|
19
|
+
* @param {string} [options.yChar=""] - yChar,y编号首字符 默认:""
|
|
20
|
+
* @param {boolean} [options.xReverseOrder=false] - xReverseOrder,X反向编号,从大到小 默认:false
|
|
21
|
+
* @param {boolean} [options.yReverseOrder=false] - yReverseOrder, Y反向编号,从大到小 默认:false
|
|
22
|
+
* @param {string} options.wkid - wkid, 输入值的wkid编号,不需要带【EPSG:】 默认:""
|
|
23
|
+
* @param {string} options.digit - 编号为位数,默认两位数 100
|
|
24
|
+
* @param {boolean} options.north - 北方向在前 默认:true
|
|
25
|
+
* @param {number} options.step - 布方步长 默认: 1
|
|
26
|
+
* @param {object} [options.createExtent] createExtent -绘制的外多变形限制范围
|
|
27
|
+
* @param {object} [options.excludeExtent] createExtent -绘制的外多变形限制范围
|
|
28
|
+
* @param {object} [options.gridType] gridType -网格类型 1,象限网格 2 y坐标以 字母递增 x坐标以数字递增
|
|
29
|
+
*/
|
|
30
|
+
static CreataGrid(option: IGridOption): {
|
|
31
|
+
type: string;
|
|
32
|
+
crs: {
|
|
33
|
+
type: string;
|
|
34
|
+
properties: {
|
|
35
|
+
name: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
features: any[];
|
|
39
|
+
};
|
|
5
40
|
/**
|
|
6
41
|
* : 检查是否css颜色
|
|
7
42
|
* @param {*} bgVal
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { base } from "../base/base";
|
|
2
|
+
import { IGridOption } from "../base/baseOptionType";
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {object} TFOption
|
|
5
|
+
* @property {Array.<number>} [startPoint=[510367.2358, 2895576.008]] - 起点坐标,西南角
|
|
6
|
+
* @property {number} [startNumberX=1] - startNumberX 东方向起始号
|
|
7
|
+
* @property {number} [startNumberY=1] - startNumberY 北方向起始号
|
|
8
|
+
* @property {number} [maxWidth=100] - maxWidth 最大宽度范围,东方向总长度
|
|
9
|
+
* @property {number} [maxHeight=100] - maxHeight 最大高度范围,北方向总长度
|
|
10
|
+
* @property {number} [onlyWidth=5] - onlyWidth, 单探方宽度
|
|
11
|
+
* @property {number} [onlyHeight=5] - onlyHeight,单探方高度
|
|
12
|
+
* @property {number} [quadrant=1] - quadrant, 象限【1,2,3,4】
|
|
13
|
+
* @property {string} [firstChar=1] - firstChar,编号首字符,一般是探方分区号
|
|
14
|
+
* @property {boolean} [xReverseOrder=false] - xReverseOrder,X反向编号,从大到小
|
|
15
|
+
* @property {boolean} [yReverseOrder=false] - yReverseOrder, Y反向编号,从大到小
|
|
16
|
+
* @property {string} [wkid] - wkid, wkid编号,不需要带【EPSG:】
|
|
17
|
+
* @property {object} [createExtent] createExtent -绘制的外多变形限制范围
|
|
18
|
+
*/
|
|
19
|
+
export declare class UserGrid extends base {
|
|
20
|
+
Option: {
|
|
21
|
+
startPoint: number[];
|
|
22
|
+
startNumberX: number;
|
|
23
|
+
startNumberY: number;
|
|
24
|
+
maxWidth: number;
|
|
25
|
+
maxHeight: number;
|
|
26
|
+
onlyWidth: number;
|
|
27
|
+
onlyHeight: number;
|
|
28
|
+
quadrant: number;
|
|
29
|
+
fqChar: string;
|
|
30
|
+
firstChar: string;
|
|
31
|
+
xChar: string;
|
|
32
|
+
yChar: string;
|
|
33
|
+
xReverseOrder: boolean;
|
|
34
|
+
yReverseOrder: boolean;
|
|
35
|
+
wkid: string;
|
|
36
|
+
digit: number;
|
|
37
|
+
north: boolean;
|
|
38
|
+
createExtent: never[];
|
|
39
|
+
excludeExtent: never[];
|
|
40
|
+
step: number;
|
|
41
|
+
gridType: number;
|
|
42
|
+
};
|
|
43
|
+
constructor();
|
|
44
|
+
/**
|
|
45
|
+
* 创建探方
|
|
46
|
+
* @param {object} options 参数
|
|
47
|
+
* @ 各项参数描述
|
|
48
|
+
* @param {Array.<number>} [options.startPoint=[510367.2358, 2895576.008]] 起点坐标,西南角
|
|
49
|
+
* @param {number} [options.startNumberX=1] - startNumberX 东方向起始号 默认:1
|
|
50
|
+
* @param {number} [options.startNumberY=1] - startNumberY 北方向起始号 默认:1
|
|
51
|
+
* @param {number} [options.maxWidth=100] - maxWidth 最大宽度范围,东方向总长度 默认:100
|
|
52
|
+
* @param {number} [options.maxHeight=100] - maxHeight 最大高度范围,北方向总长度 默认:100
|
|
53
|
+
* @param {number} [options.onlyWidth=5] - onlyWidth, 单探方宽度 默认:5
|
|
54
|
+
* @param {number} [options.onlyHeight=5] - onlyHeight,单探方高度 默认:5
|
|
55
|
+
* @param {number} [options.quadrant=1] - quadrant, 象限【1,2,3,4】 默认:1
|
|
56
|
+
* @param {string} [options.fqChar=""] - fqChar,分区号 默认:""
|
|
57
|
+
* @param {string} [options.firstChar="A"] - firstChar,编号首字符,默认是T
|
|
58
|
+
* @param {string} [options.xChar=""] - xChar,x编号首字符 默认:""
|
|
59
|
+
* @param {string} [options.yChar=""] - yChar,y编号首字符 默认:""
|
|
60
|
+
* @param {boolean} [options.xReverseOrder=false] - xReverseOrder,X反向编号,从大到小 默认:false
|
|
61
|
+
* @param {boolean} [options.yReverseOrder=false] - yReverseOrder, Y反向编号,从大到小 默认:false
|
|
62
|
+
* @param {string} options.wkid - wkid, 输入值的wkid编号,不需要带【EPSG:】 默认:""
|
|
63
|
+
* @param {string} options.digit - 编号为位数,默认两位数 100
|
|
64
|
+
* @param {boolean} options.north - 北方向在前 默认:true
|
|
65
|
+
* @param {number} options.step - 布方步长 默认: 1
|
|
66
|
+
* @param {object} [options.createExtent] createExtent -绘制的外多变形限制范围
|
|
67
|
+
* @param {object} [options.excludeExtent] createExtent -绘制的外多变形限制范围
|
|
68
|
+
* @param {object} [options.gridType] gridType -网格类型 1,象限网格 2 y坐标以 字母递增 x坐标以数字递增
|
|
69
|
+
* @returns {*} 返回标准json数据,坐标系3857,如2000坐标系则返回带有2000坐标系数组
|
|
70
|
+
*/
|
|
71
|
+
CreateGrid(options: IGridOption): {
|
|
72
|
+
type: string;
|
|
73
|
+
crs: {
|
|
74
|
+
type: string;
|
|
75
|
+
properties: {
|
|
76
|
+
name: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
features: any[];
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class zimu {
|
|
2
|
+
private currentLetter;
|
|
3
|
+
private step;
|
|
4
|
+
private isForward;
|
|
5
|
+
private history;
|
|
6
|
+
constructor(startLetter?: string);
|
|
7
|
+
setStep(step: number): void;
|
|
8
|
+
setDirection(isForward: boolean): void;
|
|
9
|
+
getNextLetter(): string;
|
|
10
|
+
generateSequence(length: number): string[];
|
|
11
|
+
getHistory(): string[];
|
|
12
|
+
reset(startLetter?: string): void;
|
|
13
|
+
}
|
package/dist/base/base.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Feature from "ol/Feature";
|
|
1
2
|
import { baseClass } from "./baseClass";
|
|
2
3
|
/**
|
|
3
4
|
* 基础baseClass
|
|
@@ -30,6 +31,7 @@ export declare class base extends baseClass {
|
|
|
30
31
|
ConvertCoordinatesTo3857(wkid: string, Coordinates: number[]): number[];
|
|
31
32
|
ConvertCoordinatesTo4326(wkid: string, Coordinates: any): any;
|
|
32
33
|
formatJsonTo3857(GeoJson: any): any;
|
|
34
|
+
read3857Json(GeoJson: any): Feature<import("ol/geom/Geometry").default>[];
|
|
33
35
|
formatJsonTo4326Json(GeoJson: any): import("geojson").FeatureCollection<import("geojson").Geometry, {
|
|
34
36
|
[name: string]: any;
|
|
35
37
|
}>;
|
|
@@ -93,6 +93,12 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
93
93
|
* @param {any} GeoJson 标准GeoJson格式
|
|
94
94
|
*/
|
|
95
95
|
addGeoJson(classname: string, GeoJson: any): void;
|
|
96
|
+
/**
|
|
97
|
+
* : 添加GeoJSON数据,需要数据库样式匹配
|
|
98
|
+
* @param {string} classname 图层编号
|
|
99
|
+
* @param {any} GeoJson 标准GeoJson格式
|
|
100
|
+
*/
|
|
101
|
+
addGeoJson3857(classname: string, GeoJson: any): void;
|
|
96
102
|
/**
|
|
97
103
|
* : 添加GeoJSON数据,多边形将转为点格式
|
|
98
104
|
* @param {string} classname 图层编号
|
|
@@ -390,3 +390,50 @@ export interface IMapViewOption {
|
|
|
390
390
|
overLayer?: any;
|
|
391
391
|
syncGraphicLayer?: boolean;
|
|
392
392
|
}
|
|
393
|
+
/**
|
|
394
|
+
* @description: 网格参数
|
|
395
|
+
* @param {Array.<number>} [options.startPoint=[510367.2358, 2895576.008]] 起点坐标,西南角
|
|
396
|
+
* @param {number} [options.startNumberX=1] - startNumberX 东方向起始号 默认:1
|
|
397
|
+
* @param {number} [options.startNumberY=1] - startNumberY 北方向起始号 默认:1
|
|
398
|
+
* @param {number} [options.maxWidth=100] - maxWidth 最大宽度范围,东方向总长度 默认:100
|
|
399
|
+
* @param {number} [options.maxHeight=100] - maxHeight 最大高度范围,北方向总长度 默认:100
|
|
400
|
+
* @param {number} [options.onlyWidth=5] - onlyWidth, 单探方宽度 默认:5
|
|
401
|
+
* @param {number} [options.onlyHeight=5] - onlyHeight,单探方高度 默认:5
|
|
402
|
+
* @param {number} [options.quadrant=1] - quadrant, 象限【1,2,3,4】 默认:1
|
|
403
|
+
* @param {string} [options.fqChar=1] - fqChar,分区号 默认:""
|
|
404
|
+
* @param {string} [options.firstChar="A"] - firstChar,编号首字符,默认是T
|
|
405
|
+
* @param {string} [options.xChar=""] - xChar,x编号首字符 默认:""
|
|
406
|
+
* @param {string} [options.yChar=""] - yChar,y编号首字符 默认:""
|
|
407
|
+
* @param {boolean} [options.xReverseOrder=false] - xReverseOrder,X反向编号,从大到小 默认:false
|
|
408
|
+
* @param {boolean} [options.yReverseOrder=false] - yReverseOrder, Y反向编号,从大到小 默认:false
|
|
409
|
+
* @param {string} options.wkid - wkid, 输入值的wkid编号,不需要带【EPSG:】 默认:""
|
|
410
|
+
* @param {string} options.digit - 编号为位数,默认两位数 100
|
|
411
|
+
* @param {boolean} options.north - 北方向在前 默认:true
|
|
412
|
+
* @param {number} options.step - 布方步长 默认: 1
|
|
413
|
+
* @param {object} [options.createExtent] createExtent -绘制的外多变形限制范围
|
|
414
|
+
* @param {object} [options.excludeExtent] createExtent -绘制的外多变形限制范围
|
|
415
|
+
* @param {object} [options.gridType] gridType -网格类型 1,象限网格 2 y坐标以 字母递增 x坐标以数字递增
|
|
416
|
+
*/
|
|
417
|
+
export interface IGridOption {
|
|
418
|
+
startPoint: number[];
|
|
419
|
+
startNumberX: number;
|
|
420
|
+
startNumberY: number;
|
|
421
|
+
maxWidth: number;
|
|
422
|
+
maxHeight: number;
|
|
423
|
+
onlyWidth: number;
|
|
424
|
+
onlyHeight: number;
|
|
425
|
+
quadrant: number;
|
|
426
|
+
fqChar: string;
|
|
427
|
+
firstChar: string;
|
|
428
|
+
xChar: string;
|
|
429
|
+
yChar: string;
|
|
430
|
+
xReverseOrder: boolean;
|
|
431
|
+
yReverseOrder: boolean;
|
|
432
|
+
wkid: string;
|
|
433
|
+
digit: number;
|
|
434
|
+
north: boolean;
|
|
435
|
+
createExtent: never[];
|
|
436
|
+
excludeExtent: never[];
|
|
437
|
+
step: number;
|
|
438
|
+
gridType: number;
|
|
439
|
+
}
|