tds-map-methods 0.1.14 → 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 +9 -2
- package/index.cjs +8 -8
- package/index.js +2261 -2027
- package/package.json +1 -1
- package/types/components/map/methods/createMic.d.ts +2 -0
- package/types/components/map/methods/fcstLayer.d.ts +34 -7
- package/types/components/map/methods/micLayer.d.ts +2 -0
- package/types/components/map/methods/tdsRequest.d.ts +1 -0
- package/types/typings/layer.d.ts +17 -0
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,8 +588,11 @@ removeMicContour(map, "micaps-weather");
|
|
|
584
588
|
import { MIC_FREEZING_RAIN_DEFAULTS } from "tds-map-methods";
|
|
585
589
|
~~~
|
|
586
590
|
|
|
587
|
-
|
|
588
|
-
|
|
591
|
+
霜冻线会自动读取 `LINES_SYMBOL` 中编码为 `38` 的线段,按照 MIC 原始坐标点依次连接,
|
|
592
|
+
并沿原始点序的一侧等距绘制短垂线。通过 `showFrostLine` 可控制霜冻线显隐,默认显示;
|
|
593
|
+
主线和短垂线的颜色可通过 `frostLineColor`
|
|
594
|
+
配置;直接调用 `createMicContour` 时传入该参数,通过 `loadLayer` 创建时也可在
|
|
595
|
+
图层的 `config` 中设置。未配置时使用红色 `#ff0000`。
|
|
589
596
|
主线使用文件线宽,默认线宽为 `3`;默认短线间距为 `22px`、长度为 `16px`。
|
|
590
597
|
霜冻线为独立图层,不参与降水区域切割,不受 `showIsoline`、`showFillcolor`
|
|
591
598
|
或 `showPointMarkers` 控制;通过 `loadLayer` 创建时会随数据集一起显隐、更新和删除。
|