mirage2d 1.2.18 → 1.2.20

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.
@@ -4,6 +4,7 @@ import { Geometry } from "ol/geom";
4
4
  import * as olExtent from "ol/extent";
5
5
  import { GraphicLayer } from "src/Layer";
6
6
  export declare class SpatialAnalysis {
7
+ static clone(ff: any): Feature<Geometry>;
7
8
  /**
8
9
  * : 创建给定半径和中心点的圆的一个扇形,位于(顺时针)bearing1和bearing2之间;0方位为中心点以北,顺时针正。
9
10
  * @param {Feature<Geometry>} center 中心点
@@ -322,6 +323,12 @@ export declare class SpatialAnalysis {
322
323
  static featureToJson(Feature: Feature<Geometry>): import("geojson").Feature<import("geojson").Geometry, {
323
324
  [name: string]: any;
324
325
  }>;
326
+ /**
327
+ * geoJson转为feature格式,不改变坐标系
328
+ * @param {any} json
329
+ * @returns {any} 返回的是个json Feature<Geometry, { [name: string]: any;}
330
+ */
331
+ static JsonTofeature(json: any): Feature<Geometry>;
325
332
  /**
326
333
  * :转为geoJson格式,元数据为3857转为4326
327
334
  * @param {Feature<Geometry>} Feature
@@ -241,6 +241,29 @@ export declare class baseGraphicLayer extends baseLayer {
241
241
  }
242
242
  */
243
243
  setSymbolByClassname(classname: any, styleOptions: any, callback?: Function): void;
244
+ /**
245
+ * 匹配fieldname字段的属性fieldvalue,满足条件的设置颜色
246
+ * @param {string} fieldname
247
+ * @param {string} fieldvalue
248
+ * @param {any[]} styleOptions
249
+ * @param {string} newclassname 新的classname 当传值时会在图层上加一个新要素
250
+ * @example styleOptions 是一个json结构
251
+ * {
252
+ Font: "12px Microsoft YaHei",
253
+ FontColor: "#8B4513",
254
+ FontStrokeColor: "#fff",
255
+ FontStrokeWidth: 2,
256
+ FontoffsetX: 0,
257
+ FontoffsetY: -10,
258
+ fillcolor: "rgba(0,0,0,0.5)",
259
+ strokecolor: "rgba(255,255,0,1)",
260
+ strokewidth: 1,
261
+ scale: 1,
262
+ radius: 10,
263
+ text: ""//可以用{字段名}格式化显示字段
264
+ }
265
+ */
266
+ setSymbolByField(fieldname: any, fieldvalue: any, styleOptions: any, newclassname?: string): void;
244
267
  /**
245
268
  * 根据features设置所有要素样式,按字段名及字段值匹配设置
246
269
  * @param {any[]} features