Commit e001df62 authored by Qiu Xiang's avatar Qiu Xiang

更新 README

parent 8e74273f
# react-native-amap3d [![npm version](https://img.shields.io/npm/v/react-native-amap3d.svg)](https://www.npmjs.com/package/react-native-amap3d)
react-native 高德地图组件,使用最新 3D SDK(目前只支持 Android)
react-native 高德地图组件,使用最新 3D SDK,支持 Android + iOS
该项目很大一定程度是参考 [react-native-maps](https://github.com/airbnb/react-native-maps)
如果不是考虑到国内的 Android 手机无法使用 Google Maps,实在没理由再造这个轮子。
所以,该项目的首要重点是对 Android 的支持,如果需要 iOS 支持,目前建议使用 react-native-maps。
该项目很大一定程度参考了 [react-native-maps](https://github.com/airbnb/react-native-maps)
## 特性(目标)
......@@ -22,11 +20,15 @@ $ npm i react-native-amap3d --save
```
### 项目配置
#### Android
推荐使用 `react-native link`
```
$ react-native link react-native-amap3d
```
#### iOS
TODO: 待完善
### 添加高德 Key
#### Android
1. [获取高德 Key](http://lbs.amap.com/api/android-sdk/guide/create-project/get-key)
......@@ -52,6 +54,9 @@ $ react-native link react-native-amap3d
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
```
#### iOS
TODO: 待完善
## 用法
更多示例请参考[示例项目](https://github.com/qiuxiang/react-native-amap3d/tree/develop/example)。
......
## Android
## 初始化
强烈推荐使用 npm@5+ 进行安装
强烈推荐使用 npm@5+ 安装依赖
```
$ npm i
$ npm run init
```
## Android
```
$ npm run android
```
## iOS
暂不支持
```
$ cd ios && pod install && cd ..
$ npm run ios
```
## 截图
......
......@@ -4,7 +4,7 @@
"init": "rm -r node_modules/react-native-amap3d; mkdir node_modules/react-native-amap3d; cp -r ../{components,package.json} node_modules/react-native-amap3d",
"start": "node node_modules/react-native/local-cli/cli.js start",
"android": "node node_modules/react-native/local-cli/cli.js run-android",
"ios": "node node_modules/react-native/local-cli/cli.js run-ios --device"
"ios": "node node_modules/react-native/local-cli/cli.js run-ios"
},
"dependencies": {
"react": "16.0.0-alpha.6",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment