mirage2d 1.1.66 → 1.1.68
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/base/baseGraphicLayer.d.ts +2 -0
- package/dist/base/baseOptionType.d.ts +27 -31
- package/dist/config/json/mapConfig.json +33 -7
- package/dist/graphic/Curve.d.ts +2 -2
- package/dist/graphic/Line.d.ts +20 -2
- package/dist/graphic/baseGraphic.d.ts +1 -1
- package/dist/graphic/label.d.ts +18 -1
- package/dist/mirage2d.cjs.js +157 -96
- package/dist/mirage2d.umd.js +157 -96
- package/package.json +2 -1
|
@@ -15,6 +15,8 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
15
15
|
option: IGraphicLayerOption;
|
|
16
16
|
constructor(layerid: string, Options?: IGraphicLayerOption);
|
|
17
17
|
initSelect(): void;
|
|
18
|
+
startMove(): void;
|
|
19
|
+
endMove(): void;
|
|
18
20
|
startEdit(): void;
|
|
19
21
|
endEdit(): void;
|
|
20
22
|
bindContextmenu(menu: any): void;
|
|
@@ -154,18 +154,20 @@ interface IStrokeOption {
|
|
|
154
154
|
color?: string;
|
|
155
155
|
width?: number;
|
|
156
156
|
lineDash?: Array<number>;
|
|
157
|
+
image?: string | undefined;
|
|
157
158
|
opacity?: number;
|
|
158
|
-
pattern?:
|
|
159
|
+
pattern?: string | undefined;
|
|
159
160
|
patternColor?: string;
|
|
160
161
|
offset?: number;
|
|
161
162
|
size?: number;
|
|
162
163
|
spacing?: number;
|
|
163
164
|
angle?: number;
|
|
164
165
|
scale?: number;
|
|
166
|
+
ratio?: number;
|
|
165
167
|
}
|
|
166
168
|
interface IFilleOption {
|
|
167
169
|
color?: string;
|
|
168
|
-
|
|
170
|
+
image?: Icon | undefined;
|
|
169
171
|
opacity?: number;
|
|
170
172
|
pattern?: FillPattern | string | undefined;
|
|
171
173
|
patternColor?: string;
|
|
@@ -174,6 +176,7 @@ interface IFilleOption {
|
|
|
174
176
|
spacing?: number;
|
|
175
177
|
angle?: number;
|
|
176
178
|
scale?: number;
|
|
179
|
+
ratio?: number;
|
|
177
180
|
}
|
|
178
181
|
export interface IGraphicOption {
|
|
179
182
|
lnglat?: Array<number> | Coordinate[][] | any;
|
|
@@ -189,54 +192,47 @@ export interface IGraphicOption {
|
|
|
189
192
|
};
|
|
190
193
|
style?: any;
|
|
191
194
|
}
|
|
192
|
-
export interface
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
stroke?: IStrokeOption;
|
|
200
|
-
};
|
|
201
|
-
zIndex?: number;
|
|
195
|
+
export interface IPointStyle {
|
|
196
|
+
text?: ITextOption;
|
|
197
|
+
image?: {
|
|
198
|
+
radius?: number;
|
|
199
|
+
scale?: number;
|
|
200
|
+
fill?: IFilleOption;
|
|
201
|
+
stroke?: IStrokeOption;
|
|
202
202
|
};
|
|
203
|
+
zIndex?: number;
|
|
204
|
+
}
|
|
205
|
+
export interface ILabelOption extends IGraphicOption {
|
|
206
|
+
style: IPointStyle;
|
|
203
207
|
}
|
|
204
208
|
export interface IPointOption extends IGraphicOption {
|
|
205
|
-
style
|
|
206
|
-
text?: ITextOption;
|
|
207
|
-
image?: {
|
|
208
|
-
radius?: number;
|
|
209
|
-
scale?: number;
|
|
210
|
-
fill?: IFilleOption;
|
|
211
|
-
stroke?: IStrokeOption;
|
|
212
|
-
};
|
|
213
|
-
zIndex?: number;
|
|
214
|
-
};
|
|
209
|
+
style: IPointStyle;
|
|
215
210
|
}
|
|
216
211
|
export interface IimagePointOption extends IGraphicOption {
|
|
217
|
-
style
|
|
212
|
+
style: {
|
|
218
213
|
text: ITextOption;
|
|
219
214
|
imageOption: any;
|
|
220
215
|
zIndex?: number;
|
|
221
216
|
};
|
|
222
217
|
}
|
|
218
|
+
export interface IPolylineStyle {
|
|
219
|
+
text?: ITextOption;
|
|
220
|
+
stroke?: IStrokeOption;
|
|
221
|
+
zIndex?: number;
|
|
222
|
+
}
|
|
223
223
|
export interface IPolylineOption extends IGraphicOption {
|
|
224
|
-
style
|
|
225
|
-
text?: ITextOption;
|
|
226
|
-
stroke?: IStrokeOption;
|
|
227
|
-
zIndex?: number;
|
|
228
|
-
};
|
|
224
|
+
style: IPolylineStyle;
|
|
229
225
|
}
|
|
230
226
|
export interface IPolygonOption extends IGraphicOption {
|
|
231
|
-
style
|
|
227
|
+
style: {
|
|
232
228
|
text?: ITextOption;
|
|
233
229
|
stroke?: IStrokeOption;
|
|
234
230
|
fill?: IFilleOption;
|
|
235
231
|
zIndex?: number;
|
|
236
232
|
};
|
|
237
233
|
}
|
|
238
|
-
export interface
|
|
239
|
-
style
|
|
234
|
+
export interface ICurveGraphicOption extends IGraphicOption {
|
|
235
|
+
style: {
|
|
240
236
|
text?: ITextOption;
|
|
241
237
|
stroke?: IStrokeOption;
|
|
242
238
|
fill?: IFilleOption;
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"type": "tdt",
|
|
74
74
|
"layertype": "img_d",
|
|
75
75
|
"key": ["ad5bee3fe473a639887fa9d57a670c6e"],
|
|
76
|
-
"url":"//192.168.
|
|
76
|
+
"url":"//192.168.5.212:9295/bjsyx/{z}/{x}/{y}.png"
|
|
77
77
|
|
|
78
78
|
},
|
|
79
79
|
{
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"type": "tdt",
|
|
82
82
|
"layertype": "img_z",
|
|
83
83
|
"key": ["ad5bee3fe473a639887fa9d57a670c6e"],
|
|
84
|
-
"url":"//192.168.28.201:
|
|
84
|
+
"url":"//192.168.28.201:9295/bjszj/{z}/{x}/{y}.png"
|
|
85
85
|
}
|
|
86
86
|
]
|
|
87
87
|
},
|
|
@@ -91,10 +91,10 @@
|
|
|
91
91
|
"name": "离线影像2",
|
|
92
92
|
"type": "xyz",
|
|
93
93
|
"icon": "image/basemaps/gaode_img.png",
|
|
94
|
-
"url":"//192.168.28.201:
|
|
94
|
+
"url":"//192.168.28.201:9888/{z}/{x}/{y}.png",
|
|
95
95
|
"layer": "vec",
|
|
96
|
-
"show": true
|
|
97
|
-
|
|
96
|
+
"show": true
|
|
97
|
+
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"id": 2021,
|
|
@@ -206,6 +206,33 @@
|
|
|
206
206
|
"url": "http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}",
|
|
207
207
|
"chinaCRS": "GCJ02"
|
|
208
208
|
},
|
|
209
|
+
{
|
|
210
|
+
"id": 2017,
|
|
211
|
+
"pid": 10,
|
|
212
|
+
"name": "谷歌卫星",
|
|
213
|
+
"icon": "image/basemaps/googleimage.png",
|
|
214
|
+
"type": "xyz",
|
|
215
|
+
"url": "https://gac-geo.googlecnapps.cn/maps/vt?lyrs=y&x={x}&y={y}&z={z}"
|
|
216
|
+
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"id": 2017,
|
|
220
|
+
"pid": 10,
|
|
221
|
+
"name": "谷歌地图",
|
|
222
|
+
"icon": "image/basemaps/googleimage.png",
|
|
223
|
+
"type": "xyz",
|
|
224
|
+
"url": "https://gac-geo.googlecnapps.cn/maps/vt?lyrs=m&x={x}&y={y}&z={z}"
|
|
225
|
+
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"id": 2017,
|
|
229
|
+
"pid": 10,
|
|
230
|
+
"name": "谷歌地形",
|
|
231
|
+
"icon": "image/basemaps/googleimage.png",
|
|
232
|
+
"type": "xyz",
|
|
233
|
+
"url": "https://gac-geo.googlecnapps.cn/maps/vt?lyrs=p&x={x}&y={y}&z={z}"
|
|
234
|
+
|
|
235
|
+
},
|
|
209
236
|
{
|
|
210
237
|
"id": 2017,
|
|
211
238
|
"pid": 10,
|
|
@@ -306,6 +333,5 @@
|
|
|
306
333
|
{ "pid":20,"name": "经纬网", "type": "graticule" }
|
|
307
334
|
]
|
|
308
335
|
},
|
|
309
|
-
"appkey":"
|
|
336
|
+
"appkey":"U2FsdGVkX18U4oqomCgBLQJGYX67uC4rmckZk//SZ+tTM2wLvyvRC2L8L0Yu+MCo+DwHa7m0avqHcSkIxh8aUBV8+Mj/W2hilkSEusbxqfzbMwSg8cgNjPwoDSzGEJsdpsVXhnuUDy/v0DdpywGbQxZij8IVzaOOYW8f3c4kgsYlgPhbuyXY/ymOGB/euBiEY929AjY3CJe3+jiso1FKQaXeZkK4qDAPapCIhHF6Cwrdi1yHl4bof/Pv1n74AmwnGPwD9LufUh7ZHTATqt0aRrNvzvRHQ8a6vZqpMymUeUFr3WER5IrgjSsVs8bCth4boOF1R3W2lthJMFC23/0mG9aTstTD9BqKI7QlkXV6kBfg93mhxySCPUdUqnQY67xwtWOHvc/NMMkJzxXZrqKNQfh+sHrIjDSIEaAAI9KBMYba6ryWSNnEoEoRDelc//pF34+SGxR/E3nptAefxsLHfYxH6Gq5QTCaFnPmaS6iU5MsJUivR+lmMJb/7ruA7ii+PFI9D/w/nQCaYhrjJYNA4KHyC9fceJ3QgbEnXTwQyxdcFInMjS3vBCyaJoEESRmRl1kW0Q/JySZFlCHVHnTsy8MpjY2A9olR6utwhAW4X6MT0yJKa6qhd5+lXN7RmaJWVuj9vCgSP1WMHMTp4bhpKxqfwAwkCz8pq9fJsilt1TJwD4WVb2FjHQ=="
|
|
310
337
|
}
|
|
311
|
-
|
package/dist/graphic/Curve.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Geometry } from 'ol/geom';
|
|
2
2
|
import { baseGraphic } from "./baseGraphic";
|
|
3
|
-
import {
|
|
3
|
+
import { ICurveGraphicOption } from "../base/baseOptionType";
|
|
4
4
|
import { Coordinate } from 'ol/coordinate';
|
|
5
5
|
export declare class CurveGraphic extends baseGraphic {
|
|
6
|
-
constructor(options:
|
|
6
|
+
constructor(options: ICurveGraphicOption);
|
|
7
7
|
setAngle(startAngle: number, stopAngle: number): void;
|
|
8
8
|
getCoordinates(): Coordinate[][];
|
|
9
9
|
createRegularPolygonCurve(origin: Coordinate, radius: number, startAngle: number, stopAngle: number, rotation: number): Geometry;
|
package/dist/graphic/Line.d.ts
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import { baseGraphic } from "./baseGraphic";
|
|
2
|
-
import {
|
|
2
|
+
import { IGraphicOption, IPolylineStyle } from "../base/baseOptionType";
|
|
3
3
|
export declare class LineGraphic extends baseGraphic {
|
|
4
|
-
constructor(options:
|
|
4
|
+
constructor(options: IGraphicOption);
|
|
5
|
+
private chaikin_copy;
|
|
6
|
+
private chaikin_smooth;
|
|
7
|
+
/**
|
|
8
|
+
* 平滑方法
|
|
9
|
+
* @param coordinate 坐标
|
|
10
|
+
* @param param 参数
|
|
11
|
+
* @returns {*}
|
|
12
|
+
*/
|
|
13
|
+
private smoothFunc;
|
|
14
|
+
/**
|
|
15
|
+
* 平滑曲线
|
|
16
|
+
* @param param 越大越平滑
|
|
17
|
+
*/
|
|
18
|
+
setSmooth(param?: number): void;
|
|
19
|
+
setLineColor(rgba: string): void;
|
|
20
|
+
setLineWidth(width: number): void;
|
|
21
|
+
setLineDash(lineDash: Array<number>): void;
|
|
22
|
+
setLineStyle(lineStyleOption: IPolylineStyle): void;
|
|
5
23
|
getCoordinates(): import("ol/coordinate").Coordinate[];
|
|
6
24
|
lineStyle(): any[];
|
|
7
25
|
}
|
|
@@ -4,7 +4,7 @@ import { proj } from "../proj4/proj";
|
|
|
4
4
|
export declare class baseGraphic extends Feature {
|
|
5
5
|
protected option: IGraphicOption;
|
|
6
6
|
protected Proj: proj;
|
|
7
|
-
constructor(options:
|
|
7
|
+
constructor(options: IGraphicOption);
|
|
8
8
|
setAttribute(attribute: IFeatureAttribute | any): void;
|
|
9
9
|
toGeoJSON(): import("geojson").Geometry;
|
|
10
10
|
bindPopup(popupInfo: string, option?: {
|
package/dist/graphic/label.d.ts
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { baseGraphic } from "./baseGraphic";
|
|
2
2
|
import { crsType } from "../Enum/typeEnum";
|
|
3
|
-
import { ILabelOption } from "../base/baseOptionType";
|
|
3
|
+
import { ILabelOption, IPointStyle } from "../base/baseOptionType";
|
|
4
4
|
export declare class LabelGraphic extends baseGraphic {
|
|
5
5
|
constructor(options: ILabelOption);
|
|
6
|
+
setLabelFont(font: string): void;
|
|
7
|
+
setLabelColor(rgba: string): void;
|
|
8
|
+
setLabelBackgroundFill(color: string): void;
|
|
9
|
+
setLabelBackgroundStroke(width: number, color: string): void;
|
|
10
|
+
setLabeloffsetXY(x: number, y: number): void;
|
|
11
|
+
setLabelPadding(padding: Array<number>): void;
|
|
12
|
+
setLabelTextBaseline(textBaseline: string): void;
|
|
13
|
+
setLabelImage(opt: {
|
|
14
|
+
scale?: number;
|
|
15
|
+
rotation?: number;
|
|
16
|
+
line?: {
|
|
17
|
+
lineColor: string;
|
|
18
|
+
lineWidth: number;
|
|
19
|
+
};
|
|
20
|
+
fillColor?: string;
|
|
21
|
+
}): void;
|
|
22
|
+
setLabelStyle(pointStyle: IPointStyle): void;
|
|
6
23
|
getCoordinates(): import("ol/coordinate").Coordinate;
|
|
7
24
|
setCoordinates(lng: number, lat: number, dataWkID?: crsType): void;
|
|
8
25
|
}
|