mirage2d 1.2.47 → 1.2.49
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/graphicLayer/ClusterLayer.d.ts +29 -1
- package/dist/Layer/tileLayer/PbfLayer.d.ts +3 -1
- package/dist/Tools/defaultStyle.d.ts +1 -0
- package/dist/base/base.d.ts +2 -0
- package/dist/base/baseGraphicLayer.d.ts +6 -0
- package/dist/base/baseOptionType.d.ts +11 -0
- package/dist/mirage2d.cjs.js +37 -37
- package/dist/mirage2d.umd.js +37 -37
- package/package.json +1 -1
|
@@ -6,13 +6,41 @@
|
|
|
6
6
|
* @Description: 功能
|
|
7
7
|
*/
|
|
8
8
|
import { Cluster } from "ol/source";
|
|
9
|
+
import SelectCluster from "ol-ext/interaction/SelectCluster";
|
|
9
10
|
import { baseGraphicLayer } from "../../base/baseGraphicLayer";
|
|
10
11
|
import { IClusterLayerOption } from "src/base/baseOptionType";
|
|
11
12
|
export declare class ClusterLayer extends baseGraphicLayer {
|
|
12
13
|
styleCache: {};
|
|
13
14
|
option: IClusterLayerOption;
|
|
14
15
|
clusterSource: Cluster;
|
|
15
|
-
selectCluster:
|
|
16
|
+
selectCluster: SelectCluster;
|
|
17
|
+
/**
|
|
18
|
+
* @param {string} layerid 图层编号
|
|
19
|
+
* @param {IClusterLayerOption=} options 配置选项.
|
|
20
|
+
* @param {bool} options.convexhull 显示外接矩形 默认true
|
|
21
|
+
* @param {bool} options.animatesel 是否使用动画 默认true
|
|
22
|
+
* @param {Number} options.animationDuration 动画合并速度, default is 500ms
|
|
23
|
+
* @param {Number} options.haslink 显示聚合点连接线 默认true
|
|
24
|
+
* @param {bool} options.distance 聚合点距离
|
|
25
|
+
* @param {Array<IlevelColor>=} options.levelColor 聚合点层级颜色数组
|
|
26
|
+
* @param {Number} options.levelColor.maxnum 最大值
|
|
27
|
+
* @param {string} options.levelColor.strokecolor 边框颜色
|
|
28
|
+
* @param {Number} options.levelColor.strokewidth 边框宽度
|
|
29
|
+
* @param {string} options.levelColor.fillcolor 背景颜色
|
|
30
|
+
* @param {ISelectClusterOption=} options.selectClusterOption
|
|
31
|
+
* @param {string} options.selectClusterOption.pointRadius //点之间的距离
|
|
32
|
+
* @param {string} options.selectClusterOption.maxObjects 最大对象数
|
|
33
|
+
* @param {string} options.selectClusterOption.spiral true螺旋 false圆
|
|
34
|
+
* @param {boolean} options.selectClusterOption.autoClose 是否自动关闭 默认false
|
|
35
|
+
* @param {IImageStyle} options.selectClusterOption.clusterPointStyle 分散时点的样式
|
|
36
|
+
* @param {Number} options.selectClusterOption.clusterPointStyle.radius 点大小
|
|
37
|
+
* @param {string} options.selectClusterOption.clusterPointStyle.stroke.color 边框颜色
|
|
38
|
+
* @param {Number} options.selectClusterOption.clusterPointStyle.stroke.width 边框宽度
|
|
39
|
+
* @param {string} options.selectClusterOption.clusterPointStyle.fill.color 背景颜色
|
|
40
|
+
* @param {IStrokeOption} options.selectClusterOption.clusterLineStyle 分散时边线样式
|
|
41
|
+
* @param {string} options.selectClusterOption.clusterLineStyle.stroke.color 边框颜色
|
|
42
|
+
* @param {Number} options.selectClusterOption.clusterLineStyle.stroke.width 边框宽度
|
|
43
|
+
*/
|
|
16
44
|
constructor(layerid: string, options?: IClusterLayerOption);
|
|
17
45
|
appendTo(map: any): void;
|
|
18
46
|
showTitle(dataType: string, isShow: boolean): void;
|
|
@@ -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/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 图层编号
|
|
@@ -196,9 +196,20 @@ export interface IHeatmapLayerOption extends IGraphicLayerOption {
|
|
|
196
196
|
export interface IClusterLayerOption extends IGraphicLayerOption {
|
|
197
197
|
convexhull?: boolean;
|
|
198
198
|
animatesel?: boolean;
|
|
199
|
+
animationDuration?: number;
|
|
199
200
|
haslink?: boolean;
|
|
200
201
|
distance?: number;
|
|
201
202
|
levelColor?: Array<IlevelColor>;
|
|
203
|
+
selectClusterOption?: ISelectClusterOption;
|
|
204
|
+
}
|
|
205
|
+
export interface ISelectClusterOption {
|
|
206
|
+
pointRadius?: number;
|
|
207
|
+
maxObjects?: number;
|
|
208
|
+
spiral?: boolean;
|
|
209
|
+
autoClose?: boolean;
|
|
210
|
+
clusterPointStyle?: IImageStyle;
|
|
211
|
+
clusterLineStyle?: IStrokeOption;
|
|
212
|
+
BackgroundCircle?: IImageStyle;
|
|
202
213
|
}
|
|
203
214
|
export interface IClusterImageLayerOption extends IGraphicLayerOption {
|
|
204
215
|
distance?: number;
|