yi-map-web 1.0.27 → 1.0.28

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 +13 -0
  2. package/package.json +3 -1
package/README.md CHANGED
@@ -28,6 +28,7 @@ npm install yi-map-web
28
28
 
29
29
  ```bash
30
30
  npm install vue@^3.4 mars3d@~3.11.0 mars3d-cesium@~1.140.0
31
+ npm install @fortawesome/fontawesome-free@^6.5.1
31
32
  npm install -D vite-plugin-mars3d
32
33
  ```
33
34
 
@@ -60,6 +61,18 @@ app.use(Mars3dVueComponents);
60
61
  app.mount("#app");
61
62
  ```
62
63
 
64
+ ### 地图配置
65
+
66
+ 组件库内置了默认地图配置(`config/config.json`),位于 `public/config/` 目录下。消费者可以获取并覆盖:
67
+
68
+ ```ts
69
+ // 获取默认配置
70
+ import defaultConfig from 'yi-map-web/config/config.json';
71
+
72
+ // 或在项目中创建自己的 config.json 并通过 prop 传入
73
+ <MarsMapContainer config-url="/your/path/config.json" />
74
+ ```
75
+
63
76
  ### 按需引入(推荐)
64
77
 
65
78
  ```vue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yi-map-web",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "Mars3D Vue3 地图组件库 - 封装了基础地图、测量、绘制、视角控制及 POI 标注、轨迹管理等业务组件",
5
5
  "type": "module",
6
6
  "main": "./dist/yi-map-web.umd.cjs",
@@ -17,6 +17,7 @@
17
17
  "import": "./dist/yi-map-web.css",
18
18
  "require": "./dist/yi-map-web.css"
19
19
  },
20
+ "./config/config.json": "./dist/config/config.json",
20
21
  "./styles": "./src/styles/index.css"
21
22
  },
22
23
  "files": [
@@ -40,6 +41,7 @@
40
41
  "author": "",
41
42
  "license": "MIT",
42
43
  "peerDependencies": {
44
+ "@fortawesome/fontawesome-free": "^6.5.1",
43
45
  "mars3d": "~3.11.0",
44
46
  "vue": "^3.4.0"
45
47
  },