tds-map-methods 0.0.0-stage → 0.1.0

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
@@ -1,3 +1,21 @@
1
- # Temporary Holding Version
1
+ # tds-map-methods
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 可复用的 TDS 地图方法库,支持 ESM 和 CommonJS。
4
+
5
+ ## 安装
6
+
7
+ ```sh
8
+ npm install tds-map-methods ol @turf/turf dayjs d3-contour lodash-es
9
+ ```
10
+
11
+ ## 使用
12
+
13
+ ```ts
14
+ import { initMap, loadLayer, removeLayerById } from "tds-map-methods";
15
+
16
+ const map = await initMap("map", { center: [118.8, 32.1], zoom: 5 });
17
+ loadLayer(map, layerOptions);
18
+ removeLayerById(layerOptions.id);
19
+ ```
20
+
21
+ 依赖 OpenLayers 浏览器运行环境。方法中的数据地址、鉴权和图像尺寸通过传入的图层配置或宿主应用环境提供。