expo-gaode-map-web-api 1.1.4-next.0 → 1.1.4-next.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 +10 -3
- package/build/utils/client.d.ts +4 -0
- package/build/utils/client.js +4 -0
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -55,8 +55,6 @@ npm install expo-gaode-map-web-api
|
|
|
55
55
|
import { ExpoGaodeMapModule } from 'expo-gaode-map-navigation';
|
|
56
56
|
|
|
57
57
|
ExpoGaodeMapModule.initSDK({
|
|
58
|
-
androidKey: 'your-android-key',
|
|
59
|
-
iosKey: 'your-ios-key',
|
|
60
58
|
webKey: 'your-web-api-key', // 关键:供 Web API 包读取
|
|
61
59
|
});
|
|
62
60
|
```
|
|
@@ -660,6 +658,15 @@ try {
|
|
|
660
658
|
- 导航一体化模块(推荐渲染地图并下发 key):`expo-gaode-map-navigation`
|
|
661
659
|
- 核心地图模块:`expo-gaode-map`
|
|
662
660
|
|
|
661
|
+
## 📚 文档与资源
|
|
662
|
+
- [在线文档](https://tomwq.github.io/expo-gaode-map/api/web-api.html)
|
|
663
|
+
- [GitHub 仓库](https://github.com/TomWq/expo-gaode-map/packages/web-api)
|
|
664
|
+
- [示例项目(地图)](https://github.com/TomWq/expo-gaode-map-example)
|
|
665
|
+
- [高德地图开放平台](https://lbs.amap.com/)
|
|
666
|
+
- [Expo Modules API](https://docs.expo.dev/modules/overview/)
|
|
667
|
+
|
|
668
|
+
|
|
663
669
|
## License
|
|
664
670
|
|
|
665
|
-
MIT
|
|
671
|
+
MIT License
|
|
672
|
+
|
package/build/utils/client.d.ts
CHANGED
package/build/utils/client.js
CHANGED
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.GaodeWebAPIClient = exports.GaodeAPIError = void 0;
|
|
7
|
+
exports.resolveWebKey = resolveWebKey;
|
|
7
8
|
const errorCodes_1 = require("./errorCodes");
|
|
9
|
+
/**
|
|
10
|
+
* 从核心包解析 getWebKey(运行时解析,避免类型导出时序问题)
|
|
11
|
+
*/
|
|
8
12
|
function resolveWebKey() {
|
|
9
13
|
// 1) 尝试从核心地图包读取
|
|
10
14
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-gaode-map-web-api",
|
|
3
|
-
"version": "1.1.4-next.
|
|
3
|
+
"version": "1.1.4-next.2",
|
|
4
4
|
"description": "高德地图 Web API 服务 - 搜索、路径规划、地理编码(纯 JavaScript 实现),配合 expo-gaode-map 使用",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
"clean": "rm -rf build",
|
|
15
15
|
"lint": "node -e \"const { spawnSync } = require('child_process'); const r = spawnSync('tsc', ['--noEmit', '--pretty', 'false'], { stdio: 'inherit' }); process.exit(r.status ?? 1);\" --",
|
|
16
16
|
"test": "bun test",
|
|
17
|
-
"prepare": "npm run build"
|
|
18
|
-
"postinstall": "node -e \"try{require.resolve('expo-gaode-map');process.exit(0)}catch(e1){try{require.resolve('expo-gaode-map-navigation');process.exit(0)}catch(e2){console.error('[expo-gaode-map-web-api] 需要安装基础地图组件:expo-gaode-map 或 expo-gaode-map-navigation 中的任意一个。\\bun add expo-gaode-map 或 bun add expo-gaode-map-navigation');process.exit(1)}}\""
|
|
17
|
+
"prepare": "npm run build"
|
|
19
18
|
},
|
|
20
19
|
"keywords": [
|
|
21
20
|
"react-native",
|