mirage2d 1.2.14 → 1.2.16
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/XMap.d.ts +1 -0
- package/dist/Layer/graphicLayer/KmlLayer.d.ts +19 -19
- package/dist/Layer/graphicLayer/WfsLayer.d.ts +36 -36
- package/dist/Layer/tileLayer/PbfLayer.d.ts +1 -0
- package/dist/MirageHttp.es.js +5268 -0
- package/dist/MirageHttp.es.js.map +205 -0
- package/dist/MirageHttp.umd.js +2 -0
- package/dist/MirageHttp.umd.js.map +1263 -0
- package/dist/base/baseGraphicLayer.d.ts +125 -125
- package/dist/graphic/baseGraphic.d.ts +4 -4
- package/dist/mirage2d.cjs.js +36 -36
- package/dist/mirage2d.umd.js +36 -36
- package/package.json +1 -1
|
@@ -147,9 +147,9 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
147
147
|
getFeature(name: any): any;
|
|
148
148
|
getFeatureByUid(uuid: any): any;
|
|
149
149
|
/**删除GeoJSON数据
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
* @description:
|
|
151
|
+
* @param {string} classname
|
|
152
|
+
*/
|
|
153
153
|
removeFeature(uuid: string | Feature<Geometry>): void;
|
|
154
154
|
/**
|
|
155
155
|
* 删除GeoJSON数据
|
|
@@ -168,51 +168,51 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
168
168
|
*/
|
|
169
169
|
replaceField(str: string): any;
|
|
170
170
|
/**
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
171
|
+
* 设置所有要素样式
|
|
172
|
+
* @description:
|
|
173
|
+
* @param {any} styleOptions
|
|
174
|
+
* @param {Function} callback 回调函数,可选 回调会返回每个feature的getProperties()属性,根据属性使用回调函数设置每个要素的styleOptions样式
|
|
175
|
+
* @example styleOptions 内容
|
|
176
|
+
* {
|
|
177
|
+
Font: "12px Microsoft YaHei",
|
|
178
|
+
FontColor: "#8B4513",
|
|
179
|
+
FontStrokeColor: "#fff",
|
|
180
|
+
FontStrokeWidth: 2,
|
|
181
|
+
FontoffsetX: 0,
|
|
182
|
+
FontoffsetY: -10,
|
|
183
|
+
fillcolor: "rgba(0, 153, 255,1)",
|
|
184
|
+
strokecolor: "rgba(255, 255, 255,1)", // 通过要素拿到具体的值
|
|
185
|
+
strokewidth: 1,
|
|
186
|
+
radius: 10,
|
|
187
|
+
scale: 1,
|
|
188
|
+
text: "标注示例" //可以用{字段名}格式化显示字段
|
|
189
|
+
}
|
|
190
|
+
*/
|
|
191
191
|
setSymbol(styleOptions: any, callback?: Function): void;
|
|
192
192
|
/**
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
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:[
|
|
202
|
+
{
|
|
203
|
+
maxnum: 0, // 分级最大值
|
|
204
|
+
fillcolor: "rgba(255,255,255,0.1)",
|
|
205
|
+
strokecolor: "rgba(255, 255, 255,1)",
|
|
206
|
+
strokewidth: 1
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
maxnum: 1, // 分级最大值
|
|
210
|
+
fillcolor: "rgba(255,255,255,0.1)",
|
|
211
|
+
strokecolor: "rgba(255, 255, 255,1)",
|
|
212
|
+
strokewidth: 1
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
*/
|
|
216
216
|
setSymbolLevelColor(levelOption: {
|
|
217
217
|
classname: string;
|
|
218
218
|
attributeName: string;
|
|
@@ -220,99 +220,99 @@ export declare class baseGraphicLayer extends baseLayer {
|
|
|
220
220
|
levelColor?: Array<IlevelColor>;
|
|
221
221
|
}): IlevelColor[];
|
|
222
222
|
/**
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
223
|
+
* 根据classname字段设置所有要素样式,按字段名及字段值匹配设置
|
|
224
|
+
* @param {string} classname
|
|
225
|
+
* @param {any[]} styleOptions
|
|
226
|
+
* @param {Function} callback 回调函数,可选 回调会返回每个feature的getProperties()属性,根据属性使用回调函数设置每个要素的styleOptions样式
|
|
227
|
+
* @example styleOptions 是一个json结构
|
|
228
|
+
* {
|
|
229
|
+
Font: "12px Microsoft YaHei",
|
|
230
|
+
FontColor: "#8B4513",
|
|
231
|
+
FontStrokeColor: "#fff",
|
|
232
|
+
FontStrokeWidth: 2,
|
|
233
|
+
FontoffsetX: 0,
|
|
234
|
+
FontoffsetY: -10,
|
|
235
|
+
fillcolor: "rgba(0,0,0,0.5)",
|
|
236
|
+
strokecolor: "rgba(255,255,0,1)",
|
|
237
|
+
strokewidth: 1,
|
|
238
|
+
scale: 1,
|
|
239
|
+
radius: 10,
|
|
240
|
+
text: ""//可以用{字段名}格式化显示字段
|
|
241
|
+
}
|
|
242
|
+
*/
|
|
243
243
|
setSymbolByClassname(classname: any, styleOptions: any, callback?: Function): void;
|
|
244
244
|
/**
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
*/
|
|
265
|
-
setSymbolByFeatures(features: any, styleOptions: any, callback?: Function): void;
|
|
266
|
-
/**
|
|
267
|
-
* 设置所有要素样式,按字段名及字段值匹配设置
|
|
268
|
-
* @description:
|
|
269
|
-
* @param {any[]} styleClassOptions
|
|
270
|
-
* @example styleClassOptions 是一个数组结构
|
|
271
|
-
* [{
|
|
272
|
-
className: "字段名",
|
|
273
|
-
classValue: "字段值",
|
|
274
|
-
style: {
|
|
275
|
-
Font: "12px Microsoft YaHei",
|
|
276
|
-
FontColor: "#8B4513",
|
|
277
|
-
FontStrokeColor: "#fff",
|
|
278
|
-
FontStrokeWidth: 2,
|
|
279
|
-
FontoffsetX: 0,
|
|
280
|
-
FontoffsetY: -10,
|
|
281
|
-
fillcolor: "rgba(0,0,0,0.5)",
|
|
282
|
-
strokecolor: "rgba(255,255,0,1)",
|
|
283
|
-
strokewidth: 1,
|
|
284
|
-
scale: 1,
|
|
285
|
-
radius: 10,
|
|
286
|
-
text: ""//可以用{字段名}格式化显示字段
|
|
245
|
+
* 根据features设置所有要素样式,按字段名及字段值匹配设置
|
|
246
|
+
* @param {any[]} features
|
|
247
|
+
* @param {any[]} styleOptions
|
|
248
|
+
* @param {Function} callback 回调函数,可选 回调会返回每个feature的getProperties()属性,根据属性使用回调函数设置每个要素的styleOptions样式
|
|
249
|
+
* @example styleOptions 是一个json结构
|
|
250
|
+
* {
|
|
251
|
+
Font: "12px Microsoft YaHei",
|
|
252
|
+
FontColor: "#8B4513",
|
|
253
|
+
FontStrokeColor: "#fff",
|
|
254
|
+
FontStrokeWidth: 2,
|
|
255
|
+
FontoffsetX: 0,
|
|
256
|
+
FontoffsetY: -10,
|
|
257
|
+
fillcolor: "rgba(0,0,0,0.5)",
|
|
258
|
+
strokecolor: "rgba(255,255,0,1)",
|
|
259
|
+
strokewidth: 1,
|
|
260
|
+
scale: 1,
|
|
261
|
+
radius: 10,
|
|
262
|
+
text: ""//可以用{字段名}格式化显示字段
|
|
287
263
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
setSymbolByStyleClass(styleClassOptions: any): void;
|
|
264
|
+
*/
|
|
265
|
+
setSymbolByFeatures(features: any, styleOptions: any, callback?: Function): void;
|
|
291
266
|
/**
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
style: {
|
|
267
|
+
* 设置所有要素样式,按字段名及字段值匹配设置
|
|
268
|
+
* @description:
|
|
269
|
+
* @param {any[]} styleClassOptions
|
|
270
|
+
* @example styleClassOptions 是一个数组结构
|
|
271
|
+
* [{
|
|
272
|
+
className: "字段名",
|
|
273
|
+
classValue: "字段值",
|
|
274
|
+
style: {
|
|
301
275
|
Font: "12px Microsoft YaHei",
|
|
302
276
|
FontColor: "#8B4513",
|
|
303
277
|
FontStrokeColor: "#fff",
|
|
304
278
|
FontStrokeWidth: 2,
|
|
305
279
|
FontoffsetX: 0,
|
|
306
280
|
FontoffsetY: -10,
|
|
307
|
-
fillcolor: "rgba(
|
|
308
|
-
strokecolor: "rgba(255,
|
|
281
|
+
fillcolor: "rgba(0,0,0,0.5)",
|
|
282
|
+
strokecolor: "rgba(255,255,0,1)",
|
|
309
283
|
strokewidth: 1,
|
|
310
|
-
radius: 3,
|
|
311
284
|
scale: 1,
|
|
285
|
+
radius: 10,
|
|
312
286
|
text: ""//可以用{字段名}格式化显示字段
|
|
313
|
-
|
|
287
|
+
}
|
|
314
288
|
}]
|
|
315
|
-
|
|
289
|
+
*/
|
|
290
|
+
setSymbolByStyleClass(styleClassOptions: any): void;
|
|
291
|
+
/**
|
|
292
|
+
* 设置所有要素样式,根据classname字段设置
|
|
293
|
+
* @description:
|
|
294
|
+
* @param {string} classname
|
|
295
|
+
* @param {any[]} styleClassOptions
|
|
296
|
+
* @example styleClassOptions 是一个数组结构
|
|
297
|
+
* [{ style 内是可选参数,根据需要设置
|
|
298
|
+
className: "字段名",
|
|
299
|
+
classValue: "字段值",
|
|
300
|
+
style: {
|
|
301
|
+
Font: "12px Microsoft YaHei",
|
|
302
|
+
FontColor: "#8B4513",
|
|
303
|
+
FontStrokeColor: "#fff",
|
|
304
|
+
FontStrokeWidth: 2,
|
|
305
|
+
FontoffsetX: 0,
|
|
306
|
+
FontoffsetY: -10,
|
|
307
|
+
fillcolor: "rgba(255, 221, 0, 1)",
|
|
308
|
+
strokecolor: "rgba(255, 255, 255,1)", //通过要素拿到具体的值
|
|
309
|
+
strokewidth: 1,
|
|
310
|
+
radius: 3,
|
|
311
|
+
scale: 1,
|
|
312
|
+
text: ""//可以用{字段名}格式化显示字段
|
|
313
|
+
},
|
|
314
|
+
}]
|
|
315
|
+
*/
|
|
316
316
|
setClassSymbol(classname: any, styleClassOptions: any): void;
|
|
317
317
|
/**设置标签启用
|
|
318
318
|
* @description: 按dataType字段配置属性
|
|
@@ -77,7 +77,7 @@ export declare class baseGraphic extends Feature {
|
|
|
77
77
|
stroke: {
|
|
78
78
|
color: "rgba(255, 255, 0,1)", // 边框色
|
|
79
79
|
width: 1, //宽度
|
|
80
|
-
|
|
80
|
+
|
|
81
81
|
},
|
|
82
82
|
})
|
|
83
83
|
*/
|
|
@@ -95,7 +95,7 @@ export declare class baseGraphic extends Feature {
|
|
|
95
95
|
stroke: {
|
|
96
96
|
color: "rgba(255, 255, 0,1)", // 边框色
|
|
97
97
|
width: 1, //宽度
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
},
|
|
100
100
|
})
|
|
101
101
|
*/
|
|
@@ -113,7 +113,7 @@ export declare class baseGraphic extends Feature {
|
|
|
113
113
|
stroke: {
|
|
114
114
|
color: "rgba(255, 255, 0,1)", // 边框色
|
|
115
115
|
width: 1, //宽度
|
|
116
|
-
|
|
116
|
+
|
|
117
117
|
},
|
|
118
118
|
})
|
|
119
119
|
*/
|
|
@@ -131,7 +131,7 @@ export declare class baseGraphic extends Feature {
|
|
|
131
131
|
stroke: {
|
|
132
132
|
color: "rgba(255, 255, 0,1)", // 边框色
|
|
133
133
|
width: 1, //宽度
|
|
134
|
-
|
|
134
|
+
|
|
135
135
|
},
|
|
136
136
|
})
|
|
137
137
|
*/
|