m4-w-fast 1.0.1 → 1.0.2

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  ### 更新说明
4
4
  - v1.0.1: 修复了安装在vite环境打包时woker不正常工作的问题
5
+ - v1.0.2: 新增了一个可以单独获取某一个break的等值面方法 `getIsoBandsByLayerBreak(breaks: number[], break: number)`
6
+ - **注意: 这个方法只用于取单等值面, 如果你需要获取所有等值面, 还是用 `getIsoBandsFast` 或者 `getIsoBandsFastByWorker` 方法**
5
7
 
6
8
  ### 使用
7
9
 
@@ -96,5 +98,25 @@ const init = async() => {
96
98
 
97
99
  ```
98
100
 
101
+ 3. 获取某一个break的等值面示例
102
+ ```typescript
103
+ clearMap()
104
+ const oneIsoBand = read.getIsoBandsByLayerBreak(lLevel.value, level)
105
+ const geo = L.geoJson(oneIsoBand, {
106
+ style(feature) {
107
+ if (!feature) return {}
108
+ const z = feature.properties.z
109
+ const rgba = read!.getColorFast(z, lLevel.value, lColor.value)
110
+ return {
111
+ opacity: 1,
112
+ stroke: false,
113
+ fillColor: rgba,
114
+ fillOpacity: 1
115
+ }
116
+ }
117
+ }).addTo(map!)
118
+
119
+ ```
120
+
99
121
  #### @author: wangrl
100
122
  #### 维护随缘