tds-map-methods 0.1.13 → 0.1.15

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/README.md CHANGED
@@ -220,6 +220,8 @@ loadLayer(map, {
220
220
  | <code>showFillcolor</code> | <code>boolean</code> | MICAPS 是否填色 |
221
221
  | <code>showIsoline</code> | <code>boolean</code> | MICAPS 是否显示等值线 |
222
222
  | <code>showPointMarkers</code> | <code>boolean</code> | MICAPS 是否显示符号点 |
223
+ | <code>showFrostLine</code> | <code>boolean</code> | MICAPS 是否显示霜冻线,默认 <code>true</code> |
224
+ | <code>frostLineColor</code> | <code>string</code> | MICAPS 霜冻线颜色,默认 <code>#ff0000</code> |
223
225
  | <code>smooth</code> | <code>boolean</code> | 是否平滑掩膜边缘 |
224
226
  | <code>smoothIterations</code> | <code>number</code> | Chaikin 平滑迭代次数,建议 1 到 3 |
225
227
  | <code>valueTransform</code> | 函数或字符串 | 绘制和查询前转换栅格值;返回空值表示无效像素 |
@@ -571,6 +573,8 @@ await createMicContour(map, {
571
573
  showFillcolor: true,
572
574
  showIsoline: true,
573
575
  showPointMarkers: true,
576
+ showFrostLine: true,
577
+ frostLineColor: "#168aad",
574
578
  });
575
579
 
576
580
  removeMicContour(map, "micaps-weather");
@@ -584,6 +588,16 @@ removeMicContour(map, "micaps-weather");
584
588
  import { MIC_FREEZING_RAIN_DEFAULTS } from "tds-map-methods";
585
589
  ~~~
586
590
 
591
+ 霜冻线会自动读取 `LINES_SYMBOL` 中编码为 `38` 的线段,按照 MIC 原始坐标点依次连接,
592
+ 并沿原始点序的一侧等距绘制短垂线。通过 `showFrostLine` 可控制霜冻线显隐,默认显示;
593
+ 主线和短垂线的颜色可通过 `frostLineColor`
594
+ 配置;直接调用 `createMicContour` 时传入该参数,通过 `loadLayer` 创建时也可在
595
+ 图层的 `config` 中设置。未配置时使用红色 `#ff0000`。
596
+ 主线使用文件线宽,默认线宽为 `3`;默认短线间距为 `22px`、长度为 `16px`。
597
+ 霜冻线为独立图层,不参与降水区域切割,不受 `showIsoline`、`showFillcolor`
598
+ 或 `showPointMarkers` 控制;通过 `loadLayer` 创建时会随数据集一起显隐、更新和删除。
599
+ 可导入 `MIC_FROST_LINE_DEFAULTS` 查看内置颜色、默认线宽及短线尺寸。
600
+
587
601
  ## TDS 数据请求
588
602
 
589
603
  包内请求方法基于浏览器 `fetch`,支持 Authorization、超时和 `AbortSignal`。