tds-map-methods 0.1.15 → 0.1.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/README.md +11 -4
- package/index.cjs +12 -12
- package/index.js +1422 -1410
- package/package.json +1 -1
- package/types/components/map/methods/createMic.d.ts +3 -0
- package/types/components/map/methods/micLayer.d.ts +3 -0
- package/types/typings/layer.d.ts +7 -1
package/README.md
CHANGED
|
@@ -222,6 +222,9 @@ loadLayer(map, {
|
|
|
222
222
|
| <code>showPointMarkers</code> | <code>boolean</code> | MICAPS 是否显示符号点 |
|
|
223
223
|
| <code>showFrostLine</code> | <code>boolean</code> | MICAPS 是否显示霜冻线,默认 <code>true</code> |
|
|
224
224
|
| <code>frostLineColor</code> | <code>string</code> | MICAPS 霜冻线颜色,默认 <code>#ff0000</code> |
|
|
225
|
+
| <code>frostLineWidth</code> | <code>number</code> | MICAPS 霜冻线线条粗细;未配置时优先使用文件线宽,默认 <code>3</code> |
|
|
226
|
+
| <code>frostLineTickSpacing</code> | <code>number</code> | MICAPS 霜冻线锯齿间隔,默认 <code>22px</code> |
|
|
227
|
+
| <code>frostLineTickLength</code> | <code>number</code> | MICAPS 霜冻线锯齿大小,默认 <code>16px</code> |
|
|
225
228
|
| <code>smooth</code> | <code>boolean</code> | 是否平滑掩膜边缘 |
|
|
226
229
|
| <code>smoothIterations</code> | <code>number</code> | Chaikin 平滑迭代次数,建议 1 到 3 |
|
|
227
230
|
| <code>valueTransform</code> | 函数或字符串 | 绘制和查询前转换栅格值;返回空值表示无效像素 |
|
|
@@ -575,6 +578,9 @@ await createMicContour(map, {
|
|
|
575
578
|
showPointMarkers: true,
|
|
576
579
|
showFrostLine: true,
|
|
577
580
|
frostLineColor: "#168aad",
|
|
581
|
+
frostLineWidth: 3,
|
|
582
|
+
frostLineTickSpacing: 22,
|
|
583
|
+
frostLineTickLength: 16,
|
|
578
584
|
});
|
|
579
585
|
|
|
580
586
|
removeMicContour(map, "micaps-weather");
|
|
@@ -590,10 +596,11 @@ import { MIC_FREEZING_RAIN_DEFAULTS } from "tds-map-methods";
|
|
|
590
596
|
|
|
591
597
|
霜冻线会自动读取 `LINES_SYMBOL` 中编码为 `38` 的线段,按照 MIC 原始坐标点依次连接,
|
|
592
598
|
并沿原始点序的一侧等距绘制短垂线。通过 `showFrostLine` 可控制霜冻线显隐,默认显示;
|
|
593
|
-
主线和短垂线的颜色可通过 `frostLineColor`
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
599
|
+
主线和短垂线的颜色可通过 `frostLineColor` 配置,`frostLineWidth` 控制线条粗细,
|
|
600
|
+
`frostLineTickSpacing` 控制锯齿间隔,`frostLineTickLength` 控制锯齿大小。
|
|
601
|
+
直接调用 `createMicContour` 时可传入这些参数,通过 `loadLayer` 创建时也可在图层的
|
|
602
|
+
`config` 中设置。颜色未配置时使用红色 `#ff0000`;线宽未配置时优先使用文件线宽,
|
|
603
|
+
文件线宽无效时默认为 `3`;默认锯齿间隔为 `22px`、大小为 `16px`。
|
|
597
604
|
霜冻线为独立图层,不参与降水区域切割,不受 `showIsoline`、`showFillcolor`
|
|
598
605
|
或 `showPointMarkers` 控制;通过 `loadLayer` 创建时会随数据集一起显隐、更新和删除。
|
|
599
606
|
可导入 `MIC_FROST_LINE_DEFAULTS` 查看内置颜色、默认线宽及短线尺寸。
|