mirage2d 1.2.42 → 1.2.43

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.
@@ -252,12 +252,12 @@ export declare class baseGraphicLayer extends baseLayer {
252
252
  */
253
253
  setSymbolByClassname(classname: any, styleOptions: any, callback?: Function): void;
254
254
  /**
255
- * 匹配fieldname字段的属性fieldvalue,满足条件的设置颜色
256
- * @param {string} fieldname
257
- * @param {string} fieldvalue
258
- * @param {any[]} styleOptions
259
- * @param {string} newclassname 新的classname 当传值时会在图层上加一个新要素
260
- * @example styleOptions 是一个json结构
255
+ * 匹配fieldname字段的属性fieldvalue,满足条件的设置颜色
256
+ * @param {string} fieldname - 字段名称
257
+ * @param {string|number} fieldvalue - 字段值
258
+ * @param {object} styleOptions - 样式配置
259
+ * @param {string} [newclassname=""] - 新图层名称(为空则修改原要素)
260
+ * @example styleOptions 是一个json结构
261
261
  * {
262
262
  Font: "12px Microsoft YaHei",
263
263
  FontColor: "#8B4513",
@@ -272,7 +272,7 @@ export declare class baseGraphicLayer extends baseLayer {
272
272
  radius: 10,
273
273
  text: ""//可以用{字段名}格式化显示字段
274
274
  }
275
- */
275
+ */
276
276
  setSymbolByField(fieldname: any, fieldvalue: any, styleOptions: any, newclassname?: string): void;
277
277
  /**
278
278
  * 根据features设置所有要素样式,按字段名及字段值匹配设置
@@ -4,5 +4,22 @@ export declare class MultiPolygonGraphic extends baseGraphic {
4
4
  constructor(options: IPolygonOption);
5
5
  setPolygonStyle(polygonStyleOption: IPolygonStyle): void;
6
6
  setCoordinates(coordinates: Array<Array<number>>, dataWkID?: string): void;
7
+ /**
8
+ * 获取多面坐标数组
9
+ * @example 示例
10
+ *
11
+ multiPolygonCoords.forEach((polygonCoords, polygonIndex) => {
12
+ console.log(`第${polygonIndex+1}个多边形坐标:`, polygonCoords);
13
+ polygonCoords.forEach((ring, ringIndex) => {
14
+ if (ringIndex === 0) {
15
+ console.log(`第${polygonIndex+1}个多边形的外环坐标:`, ring);
16
+ } else {
17
+ console.log(`第${polygonIndex+1}个多边形的内环${ringIndex}坐标:`, ring);
18
+ }
19
+ });
20
+ });
21
+
22
+ */
23
+ getGeometryCoordinates(): any;
7
24
  setGeometryFromExtent(extent: any): void;
8
25
  }