m4-w-fast 1.0.1 → 1.0.3
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 +26 -1
- package/dist/index.js +2 -2
- package/dist/intersect.worker.js +2 -2
- package/dist/isoBands.worker.js +1 -1
- package/dist/readFile.d.ts +19 -7
- package/dist/readFile.js +1 -1
- package/package.json +1 -3
package/README.md
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
### 更新说明
|
|
4
4
|
- v1.0.1: 修复了安装在vite环境打包时woker不正常工作的问题
|
|
5
|
-
|
|
5
|
+
- v1.0.2: 新增了一个可以单独获取某一个break的等值面方法 `getIsoBandsByLayerBreak(breaks: number[], break: number)`
|
|
6
|
+
- **注意: 这个方法只用于取单等值面, 如果你需要获取所有等值面, 还是用 `getIsoBandsFast` 或者 `getIsoBandsFastByWorker` 方法**
|
|
7
|
+
- v1.0.3:
|
|
8
|
+
- 添加了m4文件换行符的兼容
|
|
9
|
+
- 增加了配置项在解析的时候将开氏度转换为摄氏度 (K -> ℃) (-272.15)
|
|
10
|
+
- `read.start({ convertTemKtoC: true })`
|
|
6
11
|
### 使用
|
|
7
12
|
|
|
8
13
|
1. 安装这个库
|
|
@@ -96,5 +101,25 @@ const init = async() => {
|
|
|
96
101
|
}
|
|
97
102
|
```
|
|
98
103
|
|
|
104
|
+
3. 获取某一个break的等值面示例
|
|
105
|
+
```typescript
|
|
106
|
+
clearMap()
|
|
107
|
+
const oneIsoBand = read.getIsoBandsByLayerBreak(lLevel.value, level)
|
|
108
|
+
const geo = L.geoJson(oneIsoBand, {
|
|
109
|
+
style(feature) {
|
|
110
|
+
if (!feature) return {}
|
|
111
|
+
const z = feature.properties.z
|
|
112
|
+
const rgba = read!.getColorFast(z, lLevel.value, lColor.value)
|
|
113
|
+
return {
|
|
114
|
+
opacity: 1,
|
|
115
|
+
stroke: false,
|
|
116
|
+
fillColor: rgba,
|
|
117
|
+
fillOpacity: 1
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}).addTo(map!)
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
|
|
99
124
|
#### @author: wangrl
|
|
100
125
|
#### 维护随缘
|