diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec1767d9..e7592b59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,21 +4,20 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: npm pack - run: npx react-native init example - working-directory: ../ - - run: cp index.js ../example/ - - run: cp -r example ../example/ - - run: npm i ../react-native-amap3d/react-native-amap3d-0.0.0.tgz - working-directory: ../example + - run: cp index.js example/ + - run: cp -r example-app example/ + - run: npm i ../react-native-amap3d-0.0.0.tgz + working-directory: example - run: npm i @react-native-picker/picker @react-navigation/native @react-navigation/native-stack react-native-safe-area-context react-native-screens - working-directory: ../example + working-directory: example - run: sed -i.backup -r 's/(enableSeparateBuildPerCPUArchitecture = )false/\1true/' build.gradle - working-directory: ../example/android/app + working-directory: example/android/app - run: ./gradlew assembleRelease - working-directory: ../example/android - - uses: actions/upload-artifact@v1 + working-directory: example/android + - uses: actions/upload-artifact@v3 with: name: example.apk - path: ../example/android/app/build/outputs/apk/release/app-arm64-v8a-release.apk + path: example/android/app/build/outputs/apk/release/app-arm64-v8a-release.apk diff --git a/.gitignore b/.gitignore index 99f939c9..37c5bcbb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ build/ xcuserdata/ Pods/ lib/js/ +/android/ +/ios/ *.iml *.xcworkspace diff --git a/example/components/switch-with-label.tsx b/example-app/components/switch-with-label.tsx similarity index 100% rename from example/components/switch-with-label.tsx rename to example-app/components/switch-with-label.tsx diff --git a/example/home.tsx b/example-app/home.tsx similarity index 100% rename from example/home.tsx rename to example-app/home.tsx diff --git a/example/images/flag.png b/example-app/images/flag.png similarity index 100% rename from example/images/flag.png rename to example-app/images/flag.png diff --git a/example/images/point.png b/example-app/images/point.png similarity index 100% rename from example/images/point.png rename to example-app/images/point.png diff --git a/example/index.tsx b/example-app/index.tsx similarity index 100% rename from example/index.tsx rename to example-app/index.tsx diff --git a/example/screens/animated.tsx b/example-app/screens/animated.tsx similarity index 100% rename from example/screens/animated.tsx rename to example-app/screens/animated.tsx diff --git a/example/screens/circle.tsx b/example-app/screens/circle.tsx similarity index 100% rename from example/screens/circle.tsx rename to example-app/screens/circle.tsx diff --git a/example/screens/cluster.tsx b/example-app/screens/cluster.tsx similarity index 100% rename from example/screens/cluster.tsx rename to example-app/screens/cluster.tsx diff --git a/example/screens/controls.tsx b/example-app/screens/controls.tsx similarity index 100% rename from example/screens/controls.tsx rename to example-app/screens/controls.tsx diff --git a/example/screens/events.tsx b/example-app/screens/events.tsx similarity index 100% rename from example/screens/events.tsx rename to example-app/screens/events.tsx diff --git a/example/screens/gestures.tsx b/example-app/screens/gestures.tsx similarity index 100% rename from example/screens/gestures.tsx rename to example-app/screens/gestures.tsx diff --git a/example/screens/heat-map.tsx b/example-app/screens/heat-map.tsx similarity index 100% rename from example/screens/heat-map.tsx rename to example-app/screens/heat-map.tsx diff --git a/example/screens/index.ts b/example-app/screens/index.ts similarity index 100% rename from example/screens/index.ts rename to example-app/screens/index.ts diff --git a/example/screens/layers.tsx b/example-app/screens/layers.tsx similarity index 100% rename from example/screens/layers.tsx rename to example-app/screens/layers.tsx diff --git a/example/screens/map-types.tsx b/example-app/screens/map-types.tsx similarity index 100% rename from example/screens/map-types.tsx rename to example-app/screens/map-types.tsx diff --git a/example/screens/marker-dynamic.tsx b/example-app/screens/marker-dynamic.tsx similarity index 100% rename from example/screens/marker-dynamic.tsx rename to example-app/screens/marker-dynamic.tsx diff --git a/example/screens/marker-icon.tsx b/example-app/screens/marker-icon.tsx similarity index 100% rename from example/screens/marker-icon.tsx rename to example-app/screens/marker-icon.tsx diff --git a/example/screens/marker.tsx b/example-app/screens/marker.tsx similarity index 100% rename from example/screens/marker.tsx rename to example-app/screens/marker.tsx diff --git a/example/screens/multi-point.tsx b/example-app/screens/multi-point.tsx similarity index 100% rename from example/screens/multi-point.tsx rename to example-app/screens/multi-point.tsx diff --git a/example/screens/offline.js b/example-app/screens/offline.js similarity index 100% rename from example/screens/offline.js rename to example-app/screens/offline.js diff --git a/example/screens/polygon.tsx b/example-app/screens/polygon.tsx similarity index 100% rename from example/screens/polygon.tsx rename to example-app/screens/polygon.tsx diff --git a/example/screens/polyline.tsx b/example-app/screens/polyline.tsx similarity index 100% rename from example/screens/polyline.tsx rename to example-app/screens/polyline.tsx diff --git a/example/types.ts b/example-app/types.ts similarity index 100% rename from example/types.ts rename to example-app/types.ts diff --git a/index.js b/index.js index d3522ab9..10bf25ef 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ import { AppRegistry } from "react-native"; -import app from "./example"; +import app from "./example-app"; AppRegistry.registerComponent("example", () => app); diff --git a/readme.md b/readme.md index 71bf147c..4089322b 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # react-native-amap3d [![][version-badge]][npm] [![](https://github.com/qiuxiang/react-native-amap3d/actions/workflows/build.yml/badge.svg)](https://github.com/qiuxiang/react-native-amap3d/actions/workflows/build.yml) -**注意:该项目处于消极维护状态,随缘更新。** +**注意:该项目目前只维护,不加新功能。** react-native 高德地图组件,使用最新 3D SDK,支持 Android + iOS,受 [react-native-maps](https://github.com/airbnb/react-native-maps) 启发,提供功能丰富且易用的接口。 @@ -42,7 +42,7 @@ npm i react-native-amap3d ```js import { AMapSdk } from "react-native-amap3d"; -import { Platform } from 'react-native'; +import { Platform } from "react-native"; AMapSdk.init( Platform.select({ @@ -170,7 +170,7 @@ const markers = Array(1000) ### 更多示例 -参考 [example](https://github.com/qiuxiang/react-native-amap3d/tree/master/example)。 +参考 [example](https://github.com/qiuxiang/react-native-amap3d/tree/master/example-app)。 #### Android