@taichina/map-sdk 1.0.2 → 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.
Files changed (2) hide show
  1. package/README.md +19 -17
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,14 +5,24 @@
5
5
  ## 安装
6
6
 
7
7
  ```bash
8
+ npm install @taichina/map-sdk
9
+ ```
10
+
11
+ ## 开发
12
+
13
+ ```bash
14
+ git clone ssh://git@css.teeechina.com:8882/rswp/teeemap-sdk.git
15
+ cd teeemap-sdk
8
16
  npm install
9
17
  git submodule update --init --recursive
18
+ npm run build
10
19
  ```
11
20
 
12
21
  ## 快速开始
13
22
 
14
23
  ```typescript
15
- import { TeeeMap } from "teee-map-sdk";
24
+ import { TeeeMap } from "@taichina/map-sdk";
25
+ import maplibregl from "maplibre-gl";
16
26
 
17
27
  const teeeMap = new TeeeMap("map-container");
18
28
 
@@ -39,7 +49,7 @@ const map = teeeMap.getMap();
39
49
 
40
50
  ```typescript
41
51
  // ES Module
42
- import { TeeeMap } from "teee-map-sdk";
52
+ import { TeeeMap } from "@taichina/map-sdk";
43
53
  ```
44
54
 
45
55
  ## API
@@ -47,13 +57,12 @@ import { TeeeMap } from "teee-map-sdk";
47
57
  ### 构造函数
48
58
 
49
59
  ```typescript
50
- new TeeeMap(container: string | HTMLElement, mbtileDbClient?: any)
60
+ new TeeeMap(container: string | HTMLElement)
51
61
  ```
52
62
 
53
63
  | 参数 | 说明 |
54
64
  |------|------|
55
65
  | `container` | DOM 元素 ID 或 HTMLElement |
56
- | `mbtileDbClient` | 可选。SQLite 客户端(需具备 `prepare` / `get` / `free` 方法),传入后启用 `mbtiles://` 协议 |
57
66
 
58
67
  ### 地图创建方法
59
68
 
@@ -131,15 +140,6 @@ draw.clear(); // 清空画布
131
140
  | `getMapConfigs()` | 获取当前 `MapForgeConfig` |
132
141
  | `destroy()` | 销毁地图实例 |
133
142
 
134
- ### LayerType
135
-
136
- ```typescript
137
- type LayerType =
138
- | "background" | "track" | "track_circuit"
139
- | "signal" | "switch" | "switch_loc"
140
- | "bumper" | "insulation" | "label" | "prevention";
141
- ```
142
-
143
143
  ## 构建
144
144
 
145
145
  ```bash
@@ -163,7 +163,9 @@ npm run build # 输出到 teee-sdk/
163
163
 
164
164
  ## 依赖
165
165
 
166
- - **maplibre-gl** ^5.24.0 地图渲染引擎
167
- - **pako** ^2.1.0 — MBTiles Gzip 解压
168
- - **@watergis/maplibre-gl-terradraw** ^1.13.1 绘制工具
169
- - **TypeScript** ^6.0.3 / **Vite** ^8.0.10(开发依赖)
166
+ | | 版本 | 说明 |
167
+ |------|------|------|
168
+ | `maplibre-gl` | ^5.24.0 | peer,需自行安装 |
169
+ | `@turf/bbox` | ^7.0.0 | GeoJSON 包围盒计算 |
170
+ | `@watergis/maplibre-gl-terradraw` | ^1.13.1 | 绘制工具 |
171
+ | `pako` | ^2.1.0 | MBTiles Gzip 解压 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taichina/map-sdk",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "基于 GIS 的铁路业务地图 SDK。",
5
5
  "type": "module",
6
6
  "main": "./teee-sdk/teee-map-sdk.umd.js",