├── .babelrc ├── .buckconfig ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .watchmanconfig ├── AndroidView ├── BaiduMap.js ├── Geolocation.js ├── TraceService.js └── WebView.js ├── App.js ├── README.md ├── __tests__ ├── index.android.js └── index.ios.js ├── android ├── app │ ├── BUCK │ ├── android-key.jks │ ├── build.gradle │ ├── libs │ │ ├── BaiduLBS_Android.jar │ │ ├── BaiduTraceSDK_v3_0_1.jar │ │ ├── bos-android-sdk-1.0.2.jar │ │ └── gson-2.7.jar │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ ├── index.android.bundle │ │ └── index.android.bundle.meta │ │ ├── java │ │ └── com │ │ │ └── reactnativemap │ │ │ ├── BaiduMapViewManager.java │ │ │ ├── BaseModule.java │ │ │ ├── DrawTrackModule.java │ │ │ ├── GeolocationModule.java │ │ │ ├── GsonService.java │ │ │ ├── HistoryTrackData.java │ │ │ ├── MainActivity.java │ │ │ ├── MainApplication.java │ │ │ ├── MapUtil.java │ │ │ ├── MarkerUtil.java │ │ │ ├── MyReactPackage.java │ │ │ ├── ReactWebViewManager.java │ │ │ ├── TraceModule.java │ │ │ └── wxapi │ │ │ ├── WXEntryActivity.java │ │ │ └── WXPayEntryActivity.java │ │ ├── jniLibs │ │ ├── arm64-v8a │ │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ │ ├── libBaiduMapSDK_map_v4_3_0.so │ │ │ ├── libBaiduTraceSDK_v3_0_1.so │ │ │ └── liblocSDK7a.so │ │ ├── armeabi-v7a │ │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ │ ├── libBaiduMapSDK_map_v4_3_0.so │ │ │ ├── libBaiduTraceSDK_v3_0_1.so │ │ │ └── liblocSDK7a.so │ │ ├── armeabi │ │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ │ ├── libBaiduMapSDK_map_v4_3_0.so │ │ │ ├── libBaiduTraceSDK_v3_0_1.so │ │ │ └── liblocSDK7a.so │ │ ├── x86 │ │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ │ ├── libBaiduMapSDK_map_v4_3_0.so │ │ │ ├── libBaiduTraceSDK_v3_0_1.so │ │ │ └── liblocSDK7a.so │ │ └── x86_64 │ │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ │ ├── libBaiduMapSDK_map_v4_3_0.so │ │ │ ├── libBaiduTraceSDK_v3_0_1.so │ │ │ └── liblocSDK7a.so │ │ └── res │ │ ├── drawable-hdpi │ │ ├── node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png │ │ └── node_modules_reactnavigation_src_views_assets_backicon.png │ │ ├── drawable-mdpi │ │ ├── images_run.png │ │ ├── node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png │ │ └── node_modules_reactnavigation_src_views_assets_backicon.png │ │ ├── drawable-xhdpi │ │ ├── node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png │ │ └── node_modules_reactnavigation_src_views_assets_backicon.png │ │ ├── drawable-xxhdpi │ │ ├── node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png │ │ └── node_modules_reactnavigation_src_views_assets_backicon.png │ │ ├── drawable-xxxhdpi │ │ ├── node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png │ │ └── node_modules_reactnavigation_src_views_assets_backicon.png │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── marker_end.png │ │ ├── marker_start.png │ │ ├── popup.png │ │ ├── run.png │ │ └── running.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── keystores │ ├── BUCK │ └── debug.keystore.properties └── settings.gradle ├── app.json ├── images ├── Home2.jpg ├── List.jpg ├── list.png ├── run.png ├── share.jpg ├── trace.jpg └── wechat.jpg ├── index.android.js ├── index.ios.js ├── ios ├── reactNativeMap-tvOS │ └── Info.plist ├── reactNativeMap-tvOSTests │ └── Info.plist ├── reactNativeMap.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── reactNativeMap-tvOS.xcscheme │ │ └── reactNativeMap.xcscheme ├── reactNativeMap │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── main.m └── reactNativeMapTests │ ├── Info.plist │ └── reactNativeMapTests.m ├── jsconfig.json ├── package.json ├── server ├── fetchOperators.api.js └── server.config.js ├── view ├── BaiduMap.js ├── Details.js ├── HomePage.js ├── MainPage.navi.js ├── RecordList.js ├── TrackShowShare.js └── utils.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | .*/Libraries/react-native/ReactNative.js 16 | 17 | [include] 18 | 19 | [libs] 20 | node_modules/react-native/Libraries/react-native/react-native-interface.js 21 | node_modules/react-native/flow 22 | flow/ 23 | 24 | [options] 25 | emoji=true 26 | 27 | module.system=haste 28 | 29 | experimental.strict_type_args=true 30 | 31 | munge_underscores=true 32 | 33 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 34 | 35 | suppress_type=$FlowIssue 36 | suppress_type=$FlowFixMe 37 | suppress_type=$FixMe 38 | 39 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 40 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 41 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 42 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 43 | 44 | unsafe.enable_getters_and_setters=true 45 | 46 | [version] 47 | ^0.40.0 48 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 50 | 51 | fastlane/report.xml 52 | fastlane/Preview.html 53 | fastlane/screenshots 54 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /AndroidView/BaiduMap.js: -------------------------------------------------------------------------------- 1 | import React,{ PropTypes, Component } from 'react'; 2 | import { requireNativeComponent, View } from 'react-native'; 3 | 4 | // var iface = { 5 | // name: 'BaiduMap', 6 | // propTypes: { 7 | // mode: PropTypes.number, 8 | // center: PropTypes.object, 9 | // zoom: PropTypes.number, 10 | // trafficEnabled: PropTypes.bool, 11 | // heatMapEnabled: PropTypes.bool, 12 | // marker: PropTypes.object, 13 | // markers: PropTypes.arrayOf(PropTypes.object), 14 | // startOrStopTrace: PropTypes.number, 15 | // dreaTrackStartTime: PropTypes.object, 16 | // ...View.propTypes // 包含默认的View的属性 17 | // }, 18 | // }; 19 | 20 | const RCTBaiduMap = requireNativeComponent('RCTBaiduMap', BaiduMap, { 21 | nativeOnly: {onChange: true} 22 | }); 23 | 24 | export default class BaiduMap extends Component { 25 | static propTypes = { 26 | mode: PropTypes.number, 27 | center: PropTypes.object, 28 | zoom: PropTypes.number, 29 | trafficEnabled: PropTypes.bool, 30 | heatMapEnabled: PropTypes.bool, 31 | marker: PropTypes.object, 32 | markers: PropTypes.arrayOf(PropTypes.object), 33 | startOrStopTrace: PropTypes.number, 34 | dreaTrackStartTime: PropTypes.object, 35 | historyTracks: PropTypes.array, 36 | clearMarkers: PropTypes.bool, 37 | onHistoryTrack: PropTypes.func, 38 | ...View.propTypes // 包含默认的View的属性 39 | } 40 | 41 | static defaultProps = { 42 | mode: 1, 43 | center: null, 44 | zoom: 17, 45 | trafficEnabled: false, 46 | heatMapEnabled: false, 47 | startOrStopTrace: -1, 48 | } 49 | 50 | constructor() { 51 | super(); 52 | } 53 | 54 | _onChange(event) { 55 | if(!this.props.onHistoryTrack){ 56 | return; 57 | } 58 | this.props.onHistoryTrack(event.nativeEvent.onHistoryTrack); 59 | } 60 | 61 | render() { 62 | return ; 63 | } 64 | } 65 | 66 | 67 | -------------------------------------------------------------------------------- /AndroidView/Geolocation.js: -------------------------------------------------------------------------------- 1 | import { 2 | requireNativeComponent, 3 | NativeModules, 4 | Platform, 5 | DeviceEventEmitter 6 | } from 'react-native'; 7 | 8 | import React, { 9 | Component, 10 | PropTypes 11 | } from 'react'; 12 | 13 | 14 | const _module = NativeModules.BaiduGeolocationModule; 15 | 16 | export default { 17 | geocode(city, addr) { 18 | return new Promise((resolve, reject) => { 19 | try { 20 | _module.geocode(city, addr); 21 | } 22 | catch (e) { 23 | reject(e); 24 | return; 25 | } 26 | DeviceEventEmitter.once('onGetGeoCodeResult', resp => { 27 | resolve(resp); 28 | }); 29 | }); 30 | }, 31 | reverseGeoCode(lat, lng) { 32 | return new Promise((resolve, reject) => { 33 | try { 34 | _module.reverseGeoCode(lat, lng); 35 | } 36 | catch (e) { 37 | reject(e); 38 | return; 39 | } 40 | DeviceEventEmitter.once('onGetReverseGeoCodeResult', resp => { 41 | resolve(resp); 42 | }); 43 | }); 44 | }, 45 | reverseGeoCodeGPS(lat, lng) { 46 | return new Promise((resolve, reject) => { 47 | try { 48 | _module.reverseGeoCodeGPS(lat, lng); 49 | } 50 | catch (e) { 51 | reject(e); 52 | return; 53 | } 54 | DeviceEventEmitter.once('onGetReverseGeoCodeResult', resp => { 55 | resp.latitude = parseFloat(resp.latitude); 56 | resp.longitude = parseFloat(resp.longitude); 57 | resolve(resp); 58 | }); 59 | }); 60 | }, 61 | getCurrentPosition() { 62 | if (Platform.OS == 'ios') { 63 | return new Promise((resolve, reject) => { 64 | navigator.geolocation.getCurrentPosition((position) => { 65 | try { 66 | _module.reverseGeoCodeGPS(position.coords.latitude, position.coords.longitude); 67 | } 68 | catch (e) { 69 | reject(e); 70 | return; 71 | } 72 | DeviceEventEmitter.once('onGetReverseGeoCodeResult', resp => { 73 | resp.latitude = parseFloat(resp.latitude); 74 | resp.longitude = parseFloat(resp.longitude); 75 | resolve(resp); 76 | }); 77 | }, (error) => { 78 | reject(error); 79 | }, { 80 | enableHighAccuracy: true, 81 | timeout: 20000, 82 | maximumAge: 1000 83 | }); 84 | }); 85 | } 86 | return new Promise((resolve, reject) => { 87 | try { 88 | _module.getCurrentPosition(); 89 | } 90 | catch (e) { 91 | reject(e); 92 | return; 93 | } 94 | DeviceEventEmitter.once('onGetCurrentLocationPosition', resp => { 95 | resolve(resp); 96 | }); 97 | }); 98 | } 99 | }; 100 | -------------------------------------------------------------------------------- /AndroidView/TraceService.js: -------------------------------------------------------------------------------- 1 | import { 2 | requireNativeComponent, 3 | NativeModules, 4 | Platform, 5 | DeviceEventEmitter 6 | } from 'react-native'; 7 | 8 | import React, { 9 | Component, 10 | PropTypes 11 | } from 'react'; 12 | 13 | const _module = NativeModules.TraceModule; 14 | 15 | export default { 16 | init(){ 17 | _module.init(); 18 | }, 19 | startTrace(){ 20 | _module.startTrace(); 21 | }, 22 | stopTrace(){ 23 | _module.stopTrace(); 24 | }, 25 | getTrack(startTraceTime){ 26 | return new Promise((resolve, reject) => { 27 | try { 28 | _module.getTraces(startTraceTime); 29 | } 30 | catch (e) { 31 | reject(e); 32 | return; 33 | } 34 | DeviceEventEmitter.once('onHistoryTrackCallback', resp => { 35 | resolve(resp); 36 | }); 37 | }); 38 | } 39 | } -------------------------------------------------------------------------------- /AndroidView/WebView.js: -------------------------------------------------------------------------------- 1 | import { PropTypes } from 'react'; 2 | import { requireNativeComponent, View } from 'react-native'; 3 | 4 | var iface = { 5 | name: 'WebView', 6 | propTypes: { 7 | url: PropTypes.string, 8 | html: PropTypes.string, 9 | ...View.propTypes // 包含默认的View的属性 10 | }, 11 | }; 12 | 13 | module.exports = requireNativeComponent('RCTWebView', iface); -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | StyleSheet, 4 | Text, 5 | View, 6 | ScrollView, 7 | Image 8 | } from 'react-native'; 9 | import {DrawerNavigator,DrawerView} from 'react-navigation'; 10 | import * as WeChat from 'react-native-wechat'; 11 | import HomePage from './view/HomePage'; 12 | import RecordList from './view/RecordList'; 13 | import BaiduMapView from './view/BaiduMap'; 14 | import MainPageNavi from './view/MainPage.navi'; 15 | import TrackShare from './view/TrackShowShare'; 16 | 17 | //设置导航器,用于页面切换 18 | const MyApp = DrawerNavigator({ 19 | /*'主页': { 20 | screen: HomePage, 21 | },*/ 22 | 'MainPage': { 23 | screen: MainPageNavi, 24 | navigationOptions: { 25 | title: 'Running' 26 | } 27 | }, 28 | '记录': { 29 | screen: RecordList, 30 | navigationOptions: { 31 | title: '记录' 32 | } 33 | } 34 | },{ 35 | //设置初始页 36 | initialRouteName: 'MainPage', 37 | drawerWidth: 200, 38 | contentOptions: { 39 | activeTintColor: '#e91e63', 40 | inactiveTintColor: '#fff', 41 | style: { 42 | 43 | }, 44 | }, 45 | //slider的样式 46 | contentComponent: props => ( 47 | 48 | 52 | 53 | 54 | ) 55 | }); 56 | 57 | const styles = StyleSheet.create({ 58 | icon: { 59 | width: 100, 60 | height: 100, 61 | margin: 20 62 | }, 63 | slider: { 64 | backgroundColor: '#2c2c2c', 65 | } 66 | }); 67 | export default MyApp; 68 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # reactNativeMap 2 | 基于react-native,百度地图开发的记录运动轨迹的app 3 | 4 | ## start 5 | 在根目录执行npm install 6 | 7 | ### 依赖项: 8 | "react": "16.0.0-alpha.6", 9 | "react-native": "0.43.3", 10 | "react-native-wechat": "^1.9.2", 11 | "react-navigation": "^1.0.0-beta.7" 12 | 由于我在写的时候,0.43刚出来,本着尝鲜的冲动,用了它,导致react-navigation不兼容,会报错。这里的解决办法就是注释掉 13 | 14 | node_modules\react-navigation\src\views\Header.js 15 | 16 | 里面的第12行, 如下 17 | 18 | // import ReactComponentWithPureRenderMixin from 'react/lib/ReactComponentWithPureRenderMixin'; 19 | 20 | #### 百度地图依赖: 21 | 22 | 由于我所使用的百度地图功能,包括定位,地图,鹰眼,所以申请百度key的时候需要选择这三个,一般默认是包涵的。 23 | 24 | 百度地图的key修改位置: 25 | 26 | android\app\src\main\AndroidManifest.xml 27 | 28 | 里面的: 29 | 30 | 33 | 34 | #### 微信依赖: 35 | 36 | 使用的是react-native-wechat,它的注册是在componentDidMount生命周期方法里面注册,例如: 37 | 38 | componentDidMount() { 39 | WeChat.registerApp('你的微信key'); 40 | } 41 | 42 | 43 | #### 运行 44 | 45 | react-native run-android 46 | 47 | 这里说明, 使用android模拟器运行,会闪退,所以建议在真机上运行。 48 | 49 | ![主页](https://github.com/zachrey/reactNativeMap/blob/master/images/trace.jpg) 50 | ![菜单](https://github.com/zachrey/reactNativeMap/blob/master/images/Home2.jpg) 51 | 52 | ![记录](https://github.com/zachrey/reactNativeMap/blob/master/images/List.jpg) 53 | ![详情](https://github.com/zachrey/reactNativeMap/blob/master/images/share.jpg) 54 | 55 | ![微信](https://github.com/zachrey/reactNativeMap/blob/master/images/wechat.jpg) 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /__tests__/index.android.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Index from '../index.android.js'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | const tree = renderer.create( 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/index.ios.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Index from '../index.ios.js'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | const tree = renderer.create( 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | lib_deps = [] 12 | 13 | for jarfile in glob(['libs/*.jar']): 14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] 15 | lib_deps.append(':' + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | 21 | for aarfile in glob(['libs/*.aar']): 22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] 23 | lib_deps.append(':' + name) 24 | android_prebuilt_aar( 25 | name = name, 26 | aar = aarfile, 27 | ) 28 | 29 | android_library( 30 | name = "all-libs", 31 | exported_deps = lib_deps, 32 | ) 33 | 34 | android_library( 35 | name = "app-code", 36 | srcs = glob([ 37 | "src/main/java/**/*.java", 38 | ]), 39 | deps = [ 40 | ":all-libs", 41 | ":build_config", 42 | ":res", 43 | ], 44 | ) 45 | 46 | android_build_config( 47 | name = "build_config", 48 | package = "com.reactnativemap", 49 | ) 50 | 51 | android_resource( 52 | name = "res", 53 | package = "com.reactnativemap", 54 | res = "src/main/res", 55 | ) 56 | 57 | android_binary( 58 | name = "app", 59 | keystore = "//android/keystores:debug", 60 | manifest = "src/main/AndroidManifest.xml", 61 | package_type = "debug", 62 | deps = [ 63 | ":app-code", 64 | ], 65 | ) 66 | -------------------------------------------------------------------------------- /android/app/android-key.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/android-key.jks -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // the root of your project, i.e. where "package.json" lives 37 | * root: "../../", 38 | * 39 | * // where to put the JS bundle asset in debug mode 40 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 41 | * 42 | * // where to put the JS bundle asset in release mode 43 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 44 | * 45 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 46 | * // require('./image.png')), in debug mode 47 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 48 | * 49 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 50 | * // require('./image.png')), in release mode 51 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 52 | * 53 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 54 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 55 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 56 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 57 | * // for example, you might want to remove it from here. 58 | * inputExcludes: ["android/**", "ios/**"], 59 | * 60 | * // override which node gets called and with what additional arguments 61 | * nodeExecutableAndArgs: ["node"] 62 | * 63 | * // supply additional arguments to the packager 64 | * extraPackagerArgs: [] 65 | * ] 66 | */ 67 | 68 | apply from: "../../node_modules/react-native/react.gradle" 69 | 70 | /** 71 | * Set this to true to create two separate APKs instead of one: 72 | * - An APK that only works on ARM devices 73 | * - An APK that only works on x86 devices 74 | * The advantage is the size of the APK is reduced by about 4MB. 75 | * Upload all the APKs to the Play Store and people will download 76 | * the correct one based on the CPU architecture of their device. 77 | */ 78 | def enableSeparateBuildPerCPUArchitecture = false 79 | 80 | /** 81 | * Run Proguard to shrink the Java bytecode in release builds. 82 | */ 83 | def enableProguardInReleaseBuilds = false 84 | 85 | android { 86 | compileSdkVersion 23 87 | buildToolsVersion "23.0.1" 88 | 89 | defaultConfig { 90 | applicationId "com.reactnativemap" 91 | minSdkVersion 16 92 | targetSdkVersion 22 93 | versionCode 1 94 | versionName "1.0" 95 | ndk { 96 | abiFilters "armeabi-v7a", "x86" 97 | } 98 | manifestPlaceholders = [ 99 | // 如果有多项,每一项之间需要用逗号分隔 100 | WX_APPID: "wx6575737601f069e8"//在此修改微信APPID 101 | ] 102 | } 103 | signingConfigs { 104 | release { 105 | storeFile file(MYAPP_RELEASE_STORE_FILE) 106 | storePassword MYAPP_RELEASE_STORE_PASSWORD 107 | keyAlias MYAPP_RELEASE_KEY_ALIAS 108 | keyPassword MYAPP_RELEASE_KEY_PASSWORD 109 | } 110 | } 111 | splits { 112 | abi { 113 | reset() 114 | enable enableSeparateBuildPerCPUArchitecture 115 | universalApk false // If true, also generate a universal APK 116 | include "armeabi-v7a", "x86" 117 | } 118 | } 119 | buildTypes { 120 | release { 121 | minifyEnabled enableProguardInReleaseBuilds 122 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 123 | signingConfig signingConfigs.release 124 | } 125 | } 126 | // applicationVariants are e.g. debug, release 127 | applicationVariants.all { variant -> 128 | variant.outputs.each { output -> 129 | // For each separate APK per architecture, set a unique version code as described here: 130 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 131 | def versionCodes = ["armeabi-v7a":1, "x86":2] 132 | def abi = output.getFilter(OutputFile.ABI) 133 | if (abi != null) { // null for the universal-debug, universal-release variants 134 | output.versionCodeOverride = 135 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 136 | } 137 | } 138 | } 139 | // sourceSets { 140 | // main { 141 | // jniLibs.srcDirs = ['libs'] 142 | // } 143 | // } 144 | } 145 | 146 | dependencies { 147 | compile project(':RCTWeChat') 148 | compile fileTree(include: ['*.jar'], dir: 'libs') 149 | compile 'com.android.support:appcompat-v7:23.0.1' 150 | compile 'com.facebook.react:react-native:+' 151 | // From node_modules 152 | compile files('libs/BaiduLBS_Android.jar') 153 | compile files('libs/BaiduTraceSDK_v3_0_1.jar') 154 | compile files('libs/gson-2.7.jar') 155 | } 156 | 157 | // Run this once to be able to run the application with BUCK 158 | // puts all compile dependencies into folder libs for BUCK to use 159 | task copyDownloadableDepsToLibs(type: Copy) { 160 | from configurations.compile 161 | into 'libs' 162 | } 163 | 164 | -------------------------------------------------------------------------------- /android/app/libs/BaiduLBS_Android.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/libs/BaiduLBS_Android.jar -------------------------------------------------------------------------------- /android/app/libs/BaiduTraceSDK_v3_0_1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/libs/BaiduTraceSDK_v3_0_1.jar -------------------------------------------------------------------------------- /android/app/libs/bos-android-sdk-1.0.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/libs/bos-android-sdk-1.0.2.jar -------------------------------------------------------------------------------- /android/app/libs/gson-2.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/libs/gson-2.7.jar -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # okhttp 54 | 55 | -keepattributes Signature 56 | -keepattributes *Annotation* 57 | -keep class okhttp3.** { *; } 58 | -keep interface okhttp3.** { *; } 59 | -dontwarn okhttp3.** 60 | 61 | # okio 62 | 63 | -keep class sun.misc.Unsafe { *; } 64 | -dontwarn java.nio.file.* 65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 66 | -dontwarn okio.** 67 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 37 | 38 | 44 | 48 | 49 | 53 | 54 | 57 | 58 | 63 | 64 | 65 | 66 | 67 | 68 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /android/app/src/main/assets/index.android.bundle.meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/assets/index.android.bundle.meta -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/BaiduMapViewManager.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.support.annotation.Nullable; 6 | import android.util.Log; 7 | 8 | import com.baidu.mapapi.SDKInitializer; 9 | import com.baidu.mapapi.map.BaiduMap; 10 | import com.baidu.mapapi.map.MapStatus; 11 | import com.baidu.mapapi.map.MapStatusUpdate; 12 | import com.baidu.mapapi.map.MapStatusUpdateFactory; 13 | import com.baidu.mapapi.map.MapView; 14 | import com.baidu.mapapi.map.Marker; 15 | import com.baidu.mapapi.model.LatLng; 16 | import com.facebook.react.bridge.Arguments; 17 | import com.facebook.react.bridge.ReactApplicationContext; 18 | import com.facebook.react.bridge.ReactContext; 19 | import com.facebook.react.bridge.ReadableArray; 20 | import com.facebook.react.bridge.ReadableMap; 21 | import com.facebook.react.bridge.WritableMap; 22 | import com.facebook.react.uimanager.SimpleViewManager; 23 | import com.facebook.react.uimanager.ThemedReactContext; 24 | import com.facebook.react.uimanager.annotations.ReactProp; 25 | import com.facebook.react.uimanager.events.RCTEventEmitter; 26 | 27 | import java.util.ArrayList; 28 | import java.util.HashMap; 29 | import java.util.List; 30 | import java.util.Map; 31 | 32 | /** 33 | * Created by zachrey on 2017/4/18. 34 | */ 35 | 36 | public class BaiduMapViewManager extends SimpleViewManager implements BaiduMap.OnMapLoadedCallback { 37 | public static final String RCT_CLASS = "RCTBaiduMap"; 38 | public static final String TAG = "RCTBaiduMap"; 39 | private ThemedReactContext mReactContext; 40 | public static final int ruler = 16; 41 | private static Activity mActivity; 42 | private HashMap mMarkerMap = new HashMap<>(); 43 | private HashMap> mMarkersMap = new HashMap<>(); 44 | private BaiduMap baiduMap; 45 | private DrawTrackModule drawTrackModule; 46 | private Context context; 47 | private ReactApplicationContext mreactContext; 48 | @Override 49 | public String getName() { 50 | return RCT_CLASS; 51 | } 52 | 53 | public static void initSDK(Context context) { 54 | // this.context = context; 55 | SDKInitializer.initialize(context); 56 | } 57 | public BaiduMapViewManager(ReactApplicationContext reactContext){ 58 | this.mreactContext = reactContext; 59 | } 60 | @Override 61 | protected MapView createViewInstance(ThemedReactContext reactContext) { 62 | this.mReactContext = reactContext; 63 | 64 | return getMap(reactContext); 65 | } 66 | 67 | private MapView getMap(ThemedReactContext reactContext) { 68 | MapView mMapView = new MapView(reactContext); 69 | mMapView.showZoomControls(false); 70 | baiduMap = mMapView.getMap(); 71 | baiduMap.animateMapStatus(MapStatusUpdateFactory.zoomTo(ruler), 1 * 1000); 72 | baiduMap.setOnMapLoadedCallback(this); 73 | return mMapView; 74 | } 75 | 76 | /** 77 | * 地图模式 78 | * 79 | * @param mapView 80 | * @param type 81 | * 1. 普通 82 | * 2. 卫星 83 | */ 84 | @ReactProp(name="mode", defaultInt = 1) 85 | public void setMode(MapView mapView, int type) { 86 | Log.i(TAG, "mode:" + type); 87 | mapView.getMap().setMapType(type); 88 | } 89 | 90 | /** 91 | * 实时交通图 92 | * 93 | * @param mapView 94 | * @param isEnabled 95 | */ 96 | @ReactProp(name="trafficEnabled", defaultBoolean = false) 97 | public void setTrafficEnabled(MapView mapView, boolean isEnabled) { 98 | Log.d(TAG, "trafficEnabled:" + isEnabled); 99 | mapView.getMap().setTrafficEnabled(isEnabled); 100 | } 101 | 102 | /** 103 | * 实时道路热力图 104 | * 105 | * @param mapView 106 | * @param isEnabled 107 | */ 108 | @ReactProp(name="heatMapEnabled", defaultBoolean = false) 109 | public void setHeatMapEnabled(MapView mapView, boolean isEnabled) { 110 | Log.d(TAG, "heatMapEnabled" + isEnabled); 111 | mapView.getMap().setBaiduHeatMapEnabled(isEnabled); 112 | } 113 | 114 | /** 115 | * 中心点 116 | * 117 | * @param mapView 118 | * @param position 119 | */ 120 | @ReactProp(name="center") 121 | public void setCenter(MapView mapView, ReadableMap position) { 122 | if(position != null) { 123 | double latitude = position.getDouble("latitude"); 124 | double longitude = position.getDouble("longitude"); 125 | LatLng point = new LatLng(latitude, longitude); 126 | MapStatus mapStatus = new MapStatus.Builder() 127 | .target(point) 128 | .build(); 129 | MapStatusUpdate mapStatusUpdate = MapStatusUpdateFactory.newMapStatus(mapStatus); 130 | mapView.getMap().setMapStatus(mapStatusUpdate); 131 | } 132 | } 133 | 134 | /** 135 | * 缩放 136 | * 137 | * @param mapView 138 | * @param zoom 139 | */ 140 | @ReactProp(name="zoom") 141 | public void setZoom(MapView mapView, float zoom) { 142 | MapStatus mapStatus = new MapStatus.Builder().zoom(zoom).build(); 143 | MapStatusUpdate mapStatusUpdate = MapStatusUpdateFactory.newMapStatus(mapStatus); 144 | mapView.getMap().setMapStatus(mapStatusUpdate); 145 | } 146 | 147 | /** 148 | * marker 149 | */ 150 | 151 | @ReactProp(name="marker") 152 | public void setMarker(MapView mapView, ReadableMap option) { 153 | if(option != null) { 154 | String key = "marker_" + mapView.getId(); 155 | Marker marker = mMarkerMap.get(key); 156 | if(marker != null) { 157 | MarkerUtil.updateMaker(marker, option); 158 | } 159 | else { 160 | marker = MarkerUtil.addMarker(mapView, option); 161 | mMarkerMap.put(key, marker); 162 | } 163 | } 164 | } 165 | 166 | 167 | 168 | @ReactProp(name="markers") 169 | public void setMarkers(MapView mapView, ReadableArray options) { 170 | String key = "markers_" + mapView.getId(); 171 | List markers = mMarkersMap.get(key); 172 | if(markers == null) { 173 | markers = new ArrayList<>(); 174 | } 175 | for (int i = 0; i < options.size(); i++) { 176 | ReadableMap option = options.getMap(i); 177 | if(markers.size() > i + 1 && markers.get(i) != null) { 178 | MarkerUtil.updateMaker(markers.get(i), option); 179 | } 180 | else { 181 | markers.add(i, MarkerUtil.addMarker(mapView, option)); 182 | } 183 | } 184 | if(options.size() < markers.size()) { 185 | int start = markers.size() - 1; 186 | int end = options.size(); 187 | for (int i = start; i >= end; i--) { 188 | markers.get(i).remove(); 189 | markers.remove(i); 190 | } 191 | } 192 | mMarkersMap.put(key, markers); 193 | } 194 | 195 | @ReactProp(name = "clearMarkers") 196 | public void clearMarkers(MapView mapView, Boolean clear){ 197 | if(clear){ 198 | baiduMap.clear(); 199 | } 200 | } 201 | 202 | @ReactProp(name = "startOrStopTrace") 203 | public void setStartService(MapView mapView,int status){ 204 | if(status == 0){ 205 | ReactContext reactContext = (ReactContext)mReactContext; 206 | drawTrackModule = new DrawTrackModule(mreactContext, baiduMap, mapView, reactContext); 207 | drawTrackModule.initTraceService(); 208 | drawTrackModule.startTrace(); 209 | }else if(status == 1){ 210 | drawTrackModule.stopTrace(); 211 | } 212 | 213 | } 214 | 215 | @ReactProp(name="dreaTrackStartTime") 216 | public void setDrawTrack(MapView mapView, ReadableMap start){ 217 | if(start.getBoolean("start")){ 218 | drawTrackModule.queryHistoryTrack(start.getDouble("startTime")); 219 | } 220 | } 221 | 222 | @ReactProp(name="historyTracks") 223 | public void setHistoryTracks(MapView mapView, ReadableArray historyTracks){ 224 | //同时加入到List中,做绘制 225 | if(historyTracks.size() == 0){ 226 | return; 227 | } 228 | List latLngList = new ArrayList<>(); 229 | for(int i=0; i data = historyTrackResponse.getTrackPoints(); 185 | double distance = historyTrackResponse.getDistance(); 186 | showHistoryTrack(data, distance); 187 | } 188 | }; 189 | 190 | mTraceClient.queryHistoryTrack(historyTrackRequest, trackListener); 191 | } 192 | 193 | /** 194 | * 显示历史轨迹 195 | */ 196 | public void showHistoryTrack(List TrackPoints, double distance) { 197 | /** 198 | * 将List转换为json对象,返回给js。 199 | */ 200 | WritableMap writableMap = Arguments.createMap(); 201 | writableMap.putDouble("distance", distance); 202 | WritableArray positions = Arguments.createArray(); 203 | //同时加入到List中,做绘制 204 | List latLngList = new ArrayList<>(); 205 | if(TrackPoints != null){ 206 | for (TrackPoint trackPoint : TrackPoints) { 207 | double latitude = trackPoint.getLocation().latitude; 208 | double longitude = trackPoint.getLocation().longitude; 209 | LatLng latlng = new LatLng(latitude, longitude); 210 | latLngList.add(latlng); 211 | 212 | WritableMap position = Arguments.createMap(); 213 | position.putDouble("latitude", latitude); 214 | position.putDouble("longitude", longitude); 215 | 216 | positions.pushMap(position); 217 | } 218 | } 219 | //中心点 220 | if(positions.size() == 0){ 221 | //没有轨迹 222 | writableMap.putString("status", "10"); 223 | }else{ 224 | writableMap.putDouble("centerLat", positions.getMap(0).getDouble("latitude")); 225 | writableMap.putDouble("centerLng", positions.getMap(0).getDouble("longitude")); 226 | String str = positions.toString(); 227 | writableMap.putString("TrackPoints", str); 228 | writableMap.putString("status", "0"); 229 | // 绘制历史轨迹 230 | // drawHistoryTrack(latLngList); 231 | } 232 | 233 | //发送事件 234 | sendEvent(mapView, "onHistoryTrack", writableMap); 235 | } 236 | 237 | /** 238 | * 绘制历史轨迹 239 | * 240 | * @param points 241 | */ 242 | public void drawHistoryTrack(final List points) { 243 | // 绘制新覆盖物前,清空之前的覆盖物 244 | mBaiduMap.clear(); 245 | 246 | if (points == null || points.size() == 0) { 247 | Looper.prepare(); 248 | Toast.makeText(context, "当前查询无轨迹点", Toast.LENGTH_SHORT).show(); 249 | Looper.loop(); 250 | // resetMarker(); 251 | } else { 252 | if (points.size() > 1) { 253 | 254 | LatLng llC = points.get(0); 255 | LatLng llD = points.get(points.size() - 1); 256 | LatLngBounds bounds = new LatLngBounds.Builder() 257 | .include(llC).include(llD).build(); 258 | 259 | msUpdate = MapStatusUpdateFactory.newLatLngBounds(bounds); 260 | 261 | bmStart = BitmapDescriptorFactory.fromResource(R.mipmap.marker_start); 262 | bmEnd = BitmapDescriptorFactory.fromResource(R.mipmap.marker_end); 263 | 264 | // 添加起点图标 265 | startMarker = new MarkerOptions() 266 | .position(points.get(points.size() - 1)).icon(bmStart) 267 | .zIndex(9).draggable(true); 268 | 269 | // 添加终点图标 270 | endMarker = new MarkerOptions().position(points.get(0)) 271 | .icon(bmEnd).zIndex(9).draggable(true); 272 | 273 | // 添加路线(轨迹) 274 | polyline = new PolylineOptions(); 275 | polyline.width(10); 276 | polyline.color(Color.RED); 277 | polyline.points(points); 278 | 279 | addMarker(); 280 | 281 | } 282 | } 283 | 284 | } 285 | 286 | /** 287 | * 添加覆盖物 288 | */ 289 | public void addMarker() { 290 | 291 | if (null != msUpdate) { 292 | mBaiduMap.setMapStatus(msUpdate); 293 | } 294 | 295 | if (null != startMarker) { 296 | mBaiduMap.addOverlay(startMarker); 297 | } 298 | 299 | if (null != endMarker) { 300 | mBaiduMap.addOverlay(endMarker); 301 | } 302 | 303 | if (null != polyline) { 304 | mBaiduMap.addOverlay(polyline); 305 | } 306 | 307 | } 308 | 309 | private void sendEvent(MapView mapView, String eventName, @Nullable WritableMap params) { 310 | WritableMap event = Arguments.createMap(); 311 | event.putMap(eventName, params); 312 | // event.putString(eventName, "hahahha"); 313 | mtReactContext 314 | .getJSModule(RCTEventEmitter.class) 315 | .receiveEvent(mapView.getId(), 316 | "topChange", 317 | event); 318 | } 319 | } 320 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/GeolocationModule.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap; 2 | 3 | import android.util.Log; 4 | 5 | import com.baidu.location.BDLocation; 6 | import com.baidu.location.BDLocationListener; 7 | import com.baidu.location.LocationClient; 8 | import com.baidu.location.LocationClientOption; 9 | import com.baidu.mapapi.model.LatLng; 10 | import com.baidu.mapapi.search.core.SearchResult; 11 | import com.baidu.mapapi.search.geocode.GeoCodeOption; 12 | import com.baidu.mapapi.search.geocode.GeoCodeResult; 13 | import com.baidu.mapapi.search.geocode.GeoCoder; 14 | import com.baidu.mapapi.search.geocode.OnGetGeoCoderResultListener; 15 | import com.baidu.mapapi.search.geocode.ReverseGeoCodeOption; 16 | import com.baidu.mapapi.search.geocode.ReverseGeoCodeResult; 17 | import com.baidu.mapapi.utils.CoordinateConverter; 18 | import com.facebook.react.bridge.Arguments; 19 | import com.facebook.react.bridge.ReactApplicationContext; 20 | import com.facebook.react.bridge.ReactMethod; 21 | import com.facebook.react.bridge.WritableMap; 22 | 23 | /** 24 | * Created by lovebing on 2016/10/28. 25 | */ 26 | public class GeolocationModule extends BaseModule 27 | implements BDLocationListener, OnGetGeoCoderResultListener { 28 | 29 | private LocationClient locationClient; 30 | private static GeoCoder geoCoder; 31 | 32 | public GeolocationModule(ReactApplicationContext reactContext) { 33 | super(reactContext); 34 | context = reactContext; 35 | } 36 | 37 | public String getName() { 38 | return "BaiduGeolocationModule"; 39 | } 40 | 41 | 42 | private void initLocationClient() { 43 | LocationClientOption option = new LocationClientOption(); 44 | option.setCoorType("bd09ll"); 45 | option.setIsNeedAddress(true); 46 | option.setIsNeedAltitude(true); 47 | option.setIsNeedLocationDescribe(true); 48 | option.setOpenGps(true); 49 | locationClient = new LocationClient(context.getApplicationContext()); 50 | locationClient.setLocOption(option); 51 | Log.i("locationClient", "locationClient"); 52 | locationClient.registerLocationListener(this); 53 | } 54 | /** 55 | * 56 | * @return 57 | */ 58 | protected GeoCoder getGeoCoder() { 59 | if(geoCoder != null) { 60 | geoCoder.destroy(); 61 | } 62 | geoCoder = GeoCoder.newInstance(); 63 | geoCoder.setOnGetGeoCodeResultListener(this); 64 | return geoCoder; 65 | } 66 | 67 | /** 68 | * 69 | * @param sourceLatLng 70 | * @return 71 | */ 72 | protected LatLng getBaiduCoorFromGPSCoor(LatLng sourceLatLng) { 73 | CoordinateConverter converter = new CoordinateConverter(); 74 | converter.from(CoordinateConverter.CoordType.GPS); 75 | converter.coord(sourceLatLng); 76 | LatLng desLatLng = converter.convert(); 77 | return desLatLng; 78 | 79 | } 80 | 81 | @ReactMethod 82 | public void getCurrentPosition() { 83 | if(locationClient == null) { 84 | initLocationClient(); 85 | } 86 | Log.i("getCurrentPosition", "getCurrentPosition"); 87 | locationClient.start(); 88 | } 89 | @ReactMethod 90 | public void geocode(String city, String addr) { 91 | getGeoCoder().geocode(new GeoCodeOption() 92 | .city(city).address(addr)); 93 | } 94 | 95 | @ReactMethod 96 | public void reverseGeoCode(double lat, double lng) { 97 | getGeoCoder().reverseGeoCode(new ReverseGeoCodeOption() 98 | .location(new LatLng(lat, lng))); 99 | } 100 | 101 | @ReactMethod 102 | public void reverseGeoCodeGPS(double lat, double lng) { 103 | getGeoCoder().reverseGeoCode(new ReverseGeoCodeOption() 104 | .location(getBaiduCoorFromGPSCoor(new LatLng(lat, lng)))); 105 | } 106 | 107 | @Override 108 | public void onReceiveLocation(BDLocation bdLocation) { 109 | WritableMap params = Arguments.createMap(); 110 | params.putDouble("latitude", bdLocation.getLatitude()); 111 | params.putDouble("longitude", bdLocation.getLongitude()); 112 | params.putDouble("direction", bdLocation.getDirection()); 113 | params.putDouble("altitude", bdLocation.getAltitude()); 114 | params.putDouble("radius", bdLocation.getRadius()); 115 | params.putString("address", bdLocation.getAddrStr()); 116 | params.putString("countryCode", bdLocation.getCountryCode()); 117 | params.putString("country", bdLocation.getCountry()); 118 | params.putString("province", bdLocation.getProvince()); 119 | params.putString("cityCode", bdLocation.getCityCode()); 120 | params.putString("city", bdLocation.getCity()); 121 | params.putString("district", bdLocation.getDistrict()); 122 | params.putString("street", bdLocation.getStreet()); 123 | params.putString("streetNumber", bdLocation.getStreetNumber()); 124 | params.putString("buildingId", bdLocation.getBuildingID()); 125 | params.putString("buildingName", bdLocation.getBuildingName()); 126 | Log.i("onReceiveLocation", "onGetCurrentLocationPosition"); 127 | sendEvent("onGetCurrentLocationPosition", params); 128 | locationClient.stop(); 129 | } 130 | 131 | @Override 132 | public void onConnectHotSpotMessage(String s, int i) { 133 | 134 | } 135 | 136 | @Override 137 | public void onGetGeoCodeResult(GeoCodeResult result) { 138 | WritableMap params = Arguments.createMap(); 139 | if (result == null || result.error != SearchResult.ERRORNO.NO_ERROR) { 140 | params.putInt("errcode", -1); 141 | } 142 | else { 143 | params.putDouble("latitude", result.getLocation().latitude); 144 | params.putDouble("longitude", result.getLocation().longitude); 145 | } 146 | sendEvent("onGetGeoCodeResult", params); 147 | } 148 | 149 | @Override 150 | public void onGetReverseGeoCodeResult(ReverseGeoCodeResult result) { 151 | WritableMap params = Arguments.createMap(); 152 | if (result == null || result.error != SearchResult.ERRORNO.NO_ERROR) { 153 | params.putInt("errcode", -1); 154 | } 155 | else { 156 | ReverseGeoCodeResult.AddressComponent addressComponent = result.getAddressDetail(); 157 | params.putString("address", result.getAddress()); 158 | params.putString("province", addressComponent.province); 159 | params.putString("city", addressComponent.city); 160 | params.putString("district", addressComponent.district); 161 | params.putString("street", addressComponent.street); 162 | params.putString("streetNumber", addressComponent.streetNumber); 163 | } 164 | sendEvent("onGetReverseGeoCodeResult", params); 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/GsonService.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap; 2 | 3 | import com.google.gson.Gson; 4 | 5 | public class GsonService { 6 | 7 | public static T parseJson(String jsonString, Class clazz) { 8 | T t = null; 9 | try { 10 | Gson gson = new Gson(); 11 | t = gson.fromJson(jsonString, clazz); 12 | } catch (Exception e) { 13 | // TODO: handle exception 14 | System.out.println("解析json失败"); 15 | } 16 | return t; 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/HistoryTrackData.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Iterator; 5 | import java.util.List; 6 | 7 | import com.baidu.mapapi.model.LatLng; 8 | 9 | /** 10 | * Created by zachrey on 2017/4/21. 11 | */ 12 | 13 | public class HistoryTrackData { 14 | /** 15 | * 历史轨迹数据 16 | * 17 | * 18 | */ 19 | 20 | public int status; // 状态码,0为成功 21 | public int size; // 返回结果条数,该页返回了几条数据 22 | public int total; // 符合条件结果条数,一共有几条符合条件的数据 23 | public String entity_name;// 返回的entity标识 24 | public List points; 25 | public String message; // 响应信息,对status的中文描述 26 | 27 | public class Points { 28 | 29 | public String loc_time;// 该track实时点的上传时间 UNIX时间戳 该时间为用户上传的时间 30 | public List location;// 经纬度 Array 百度加密坐标 31 | public String create_time;// 创建时间 格式化时间 该时间为服务端时间 32 | public String device_id;// 设备编号 string, 当service的type是2和4,且为该属性赋过值才会返回 33 | public double radius;// GPS定位精度 当service的type是1,2,3,4,且创建该track的时候输入了这个字段才会返回。 34 | public double realtime_poiid; 35 | public int direction; // GPS方向 当service的type是1,且创建该track的时候输入了这个字段才会返回。 36 | public double speed;// GPS速度当service的type是1,且创建该track的时候输入了这个字段才会返回。 37 | 38 | public String getLoc_time() { 39 | return loc_time; 40 | } 41 | 42 | public void setLoc_time(String loc_time) { 43 | this.loc_time = loc_time; 44 | } 45 | 46 | public List getLocation() { 47 | return location; 48 | } 49 | 50 | public void setLocation(List location) { 51 | this.location = location; 52 | } 53 | 54 | public String getCreate_time() { 55 | return create_time; 56 | } 57 | 58 | public void setCreate_time(String create_time) { 59 | this.create_time = create_time; 60 | } 61 | 62 | public String getDevice_id() { 63 | return device_id; 64 | } 65 | 66 | public void setDevice_id(String device_id) { 67 | this.device_id = device_id; 68 | } 69 | 70 | public double getRadius() { 71 | return radius; 72 | } 73 | 74 | public void setRadius(double radius) { 75 | this.radius = radius; 76 | } 77 | 78 | public double getRealtime_poiid() { 79 | return realtime_poiid; 80 | } 81 | 82 | public void setRealtime_poiid(double realtime_poiid) { 83 | this.realtime_poiid = realtime_poiid; 84 | } 85 | 86 | public int getDirection() { 87 | return direction; 88 | } 89 | 90 | public void setDirection(int direction) { 91 | this.direction = direction; 92 | } 93 | 94 | public double getSpeed() { 95 | return speed; 96 | } 97 | 98 | public void setSpeed(double speed) { 99 | this.speed = speed; 100 | } 101 | 102 | } 103 | 104 | public List getListPoints() { 105 | List list = new ArrayList(); 106 | 107 | if (points == null || points.size() == 0) { 108 | return null; 109 | 110 | } 111 | Iterator it = points.iterator(); 112 | 113 | while (it.hasNext()) { 114 | Points pois = (Points) it.next(); 115 | 116 | List location = pois.getLocation(); 117 | LatLng latLng = new LatLng(location.get(1), location.get(0)); 118 | list.add(latLng); 119 | 120 | } 121 | return list; 122 | 123 | } 124 | 125 | public int getStatus() { 126 | return status; 127 | } 128 | 129 | public void setStatus(int status) { 130 | this.status = status; 131 | } 132 | 133 | public int getSize() { 134 | return size; 135 | } 136 | 137 | public void setSize(int size) { 138 | this.size = size; 139 | } 140 | 141 | public int getTotal() { 142 | return total; 143 | } 144 | 145 | public void setTotal(int total) { 146 | this.total = total; 147 | } 148 | 149 | public String getMessage() { 150 | return message; 151 | } 152 | 153 | public void setMessage(String message) { 154 | this.message = message; 155 | } 156 | 157 | @Override 158 | public String toString() { 159 | return "HistoryTrackData [status=" + status + ", size=" + size + ", total=" + total + ", entity_name=" 160 | + entity_name + ", points =" + points + ", message=" + message + "]"; 161 | } 162 | 163 | } 164 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "reactNativeMap"; 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap; 2 | 3 | import android.app.Activity; 4 | import android.app.Application; 5 | import com.theweflex.react.WeChatPackage; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.shell.MainReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | 12 | import java.util.Arrays; 13 | import java.util.List; 14 | 15 | public class MainApplication extends Application implements ReactApplication { 16 | 17 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | return Arrays.asList( 26 | new MainReactPackage(), 27 | new WeChatPackage(), 28 | new MyReactPackage(getApplicationContext()) 29 | 30 | ); 31 | } 32 | }; 33 | 34 | @Override 35 | public ReactNativeHost getReactNativeHost() { 36 | return mReactNativeHost; 37 | } 38 | 39 | @Override 40 | public void onCreate() { 41 | super.onCreate(); 42 | SoLoader.init(this, /* native exopackage */ false); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/MapUtil.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap; 2 | 3 | 4 | import com.baidu.mapapi.model.LatLng; 5 | 6 | 7 | /** 8 | * Created by baidu on 17/2/9. 9 | */ 10 | 11 | public class MapUtil { 12 | 13 | public static LatLng convertTrace2Map(com.baidu.trace.model.LatLng traceLatLng) { 14 | return new LatLng(traceLatLng.latitude, traceLatLng.longitude); 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/MarkerUtil.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap; 2 | 3 | import android.util.Log; 4 | import android.view.Gravity; 5 | import android.view.View; 6 | import android.widget.Button; 7 | import android.widget.TextView; 8 | 9 | import com.baidu.mapapi.map.BitmapDescriptor; 10 | import com.baidu.mapapi.map.BitmapDescriptorFactory; 11 | import com.baidu.mapapi.map.InfoWindow; 12 | import com.baidu.mapapi.map.MapView; 13 | import com.baidu.mapapi.map.Marker; 14 | import com.baidu.mapapi.map.MarkerOptions; 15 | import com.baidu.mapapi.map.OverlayOptions; 16 | import com.baidu.mapapi.model.LatLng; 17 | import com.facebook.react.bridge.ReadableMap; 18 | 19 | /** 20 | * Created by lovebing on Sept 28, 2016. 21 | */ 22 | public class MarkerUtil { 23 | // private static TextView mMarkerText; 24 | // public static InfoWindow infoWindow; 25 | 26 | 27 | public static void updateMaker(Marker maker, ReadableMap option) { 28 | LatLng position = getLatLngFromOption(option); 29 | maker.setPosition(position); 30 | 31 | // maker.setTitle(option.getString("title")); 32 | } 33 | 34 | public static Marker addMarker(MapView mapView, ReadableMap option) { 35 | 36 | BitmapDescriptor bitmap = null; 37 | Boolean startOrEnd = option.getBoolean("startOrEnd"); 38 | if(startOrEnd){ 39 | bitmap = BitmapDescriptorFactory.fromResource(R.mipmap.running); 40 | }else{ 41 | bitmap = BitmapDescriptorFactory.fromResource(R.mipmap.marker_end); 42 | } 43 | 44 | LatLng position = getLatLngFromOption(option); 45 | OverlayOptions overlayOptions = new MarkerOptions() 46 | .icon(bitmap) 47 | .position(position) 48 | .title(option.getString("title")); 49 | 50 | // //文字 51 | // if(mMarkerText == null) { 52 | // mMarkerText = new TextView(mapView.getContext()); 53 | // mMarkerText.setBackgroundResource(R.mipmap.popup); 54 | // mMarkerText.setGravity(Gravity.CENTER_HORIZONTAL); 55 | // mMarkerText.setPadding(32, 32, 32, 32); 56 | // } 57 | // 58 | // mMarkerText.setText(option.getString("title")); 59 | // infoWindow = new InfoWindow(mMarkerText, position, -80); 60 | // mMarkerText.setVisibility(View.GONE); 61 | // mapView.getMap().showInfoWindow(infoWindow); 62 | 63 | 64 | //设置marker 65 | Marker marker = (Marker)mapView.getMap().addOverlay(overlayOptions); 66 | return marker; 67 | } 68 | 69 | 70 | private static LatLng getLatLngFromOption(ReadableMap option) { 71 | double latitude = option.getDouble("latitude"); 72 | double longitude = option.getDouble("longitude"); 73 | return new LatLng(latitude, longitude); 74 | 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/MyReactPackage.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | 6 | import com.facebook.react.ReactPackage; 7 | import com.facebook.react.bridge.JavaScriptModule; 8 | import com.facebook.react.bridge.NativeModule; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.uimanager.ViewManager; 11 | 12 | import java.util.ArrayList; 13 | import java.util.Arrays; 14 | import java.util.Collections; 15 | import java.util.List; 16 | 17 | /** 18 | * Created by zachrey on 2017/4/17. 19 | */ 20 | 21 | public class MyReactPackage implements ReactPackage { 22 | 23 | private Context mContext; 24 | 25 | BaiduMapViewManager baiduMapViewManager; 26 | 27 | public MyReactPackage(Context context) { 28 | this.mContext = context; 29 | baiduMapViewManager.initSDK(context); 30 | } 31 | 32 | @Override 33 | public List createNativeModules(ReactApplicationContext reactContext) { 34 | List modules=new ArrayList<>(); 35 | //将我们创建的类添加进原生模块列表中 36 | modules.add(new GeolocationModule(reactContext)); 37 | modules.add(new TraceModule(reactContext)); 38 | return modules; 39 | } 40 | 41 | @Override 42 | public List> createJSModules() { 43 | return Collections.emptyList(); 44 | } 45 | 46 | @Override 47 | public List createViewManagers(ReactApplicationContext reactContext) { 48 | return Arrays.asList( 49 | new ReactWebViewManager(), 50 | new BaiduMapViewManager(reactContext)); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/ReactWebViewManager.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap; 2 | 3 | import android.support.annotation.Nullable; 4 | import android.webkit.WebView; 5 | import android.webkit.WebViewClient; 6 | 7 | import com.facebook.react.uimanager.SimpleViewManager; 8 | import com.facebook.react.uimanager.ThemedReactContext; 9 | import com.facebook.react.uimanager.annotations.ReactProp; 10 | 11 | /** 12 | * Created by zachrey on 2017/4/18. 13 | */ 14 | 15 | public class ReactWebViewManager extends SimpleViewManager { 16 | public static final String REACT_Class = "RCTWebView"; 17 | @Override 18 | public String getName() { 19 | return REACT_Class; 20 | } 21 | 22 | @Override 23 | protected WebView createViewInstance(ThemedReactContext reactContext) { 24 | WebView webView= new WebView(reactContext); 25 | webView.setWebViewClient(new WebViewClient(){ 26 | @Override 27 | public boolean shouldOverrideUrlLoading(WebView view, String url) { 28 | view.loadUrl(url); 29 | return true; 30 | } 31 | }); 32 | return webView; 33 | } 34 | 35 | @ReactProp(name="url") 36 | public void setUrl(WebView view, @Nullable String url) { 37 | view.loadUrl(url); 38 | } 39 | 40 | @ReactProp(name="html") 41 | public void setHtml(WebView view, @Nullable String html) { 42 | view.loadData(html,"text/html; charset=utf-8", "UTF-8"); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/TraceModule.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap; 2 | 3 | import android.util.Log; 4 | 5 | import com.baidu.trace.LBSTraceClient; 6 | import com.baidu.trace.Trace; 7 | import com.baidu.trace.api.track.HistoryTrackRequest; 8 | import com.baidu.trace.api.track.HistoryTrackResponse; 9 | import com.baidu.trace.api.track.OnTrackListener; 10 | import com.baidu.trace.api.track.QueryCacheTrackResponse; 11 | import com.baidu.trace.model.OnTraceListener; 12 | import com.baidu.trace.model.PushMessage; 13 | import com.facebook.react.bridge.Arguments; 14 | import com.facebook.react.bridge.ReactApplicationContext; 15 | import com.facebook.react.bridge.ReactMethod; 16 | import com.facebook.react.bridge.WritableMap; 17 | 18 | /** 19 | * Created by zachrey on 2017/4/20. 20 | */ 21 | 22 | public class TraceModule extends BaseModule { 23 | private static final String RCT_CLASS = "TraceModule"; 24 | private Trace mTrace; 25 | private LBSTraceClient mTraceClient; 26 | private OnTraceListener mTraceListener; 27 | 28 | public TraceModule(ReactApplicationContext reactContext) { 29 | super(reactContext); 30 | //Base里面的context 31 | context = reactContext; 32 | } 33 | 34 | @Override 35 | public String getName() { 36 | return RCT_CLASS; 37 | } 38 | 39 | /** 40 | * 初始化鹰眼服务 41 | */ 42 | private void initTraceService(){ 43 | // 轨迹服务ID 44 | long serviceId = 138750; 45 | // 设备标识 46 | String entityName = "reactNativeMap"; 47 | // 是否需要对象存储服务,默认为:false,关闭对象存储服务。注:鹰眼 Android SDK v3.0以上版本支持随轨迹上传图像等对象数据,若需使用此功能,该参数需设为 true,且需导入bos-android-sdk-1.0.2.jar。 48 | boolean isNeedObjectStorage = false; 49 | if(mTrace == null){ 50 | // 初始化轨迹服务 51 | mTrace = new Trace(serviceId, entityName, isNeedObjectStorage); 52 | } 53 | if(mTraceClient == null){ 54 | // 初始化轨迹服务客户端 55 | mTraceClient = new LBSTraceClient(context); 56 | setListener(); 57 | } 58 | // 定位周期(单位:秒) 59 | int gatherInterval = 5; 60 | // 打包回传周期(单位:秒) 61 | int packInterval = 10; 62 | // 设置定位和打包周期 63 | mTraceClient.setInterval(gatherInterval, packInterval); 64 | 65 | } 66 | 67 | /** 68 | * 设置状态监听 69 | */ 70 | private void setListener(){ 71 | if(mTraceListener == null){ 72 | // 初始化轨迹服务监听器 73 | mTraceListener = new OnTraceListener() { 74 | // 开启服务回调 75 | @Override 76 | public void onStartTraceCallback(int status, String message) { 77 | Log.i("status", "status:"+status); 78 | } 79 | // 停止服务回调 80 | @Override 81 | public void onStopTraceCallback(int status, String message) { 82 | Log.i("status", "status:"+status); 83 | } 84 | // 开启采集回调 85 | @Override 86 | public void onStartGatherCallback(int status, String message) { 87 | Log.i("status", "status:"+status); 88 | } 89 | // 停止采集回调 90 | @Override 91 | public void onStopGatherCallback(int status, String message) { 92 | Log.i("status", "status:"+status); 93 | } 94 | // 推送回调 95 | @Override 96 | public void onPushCallback(byte messageNo, PushMessage message) { 97 | Log.i("status", "status:"+message); 98 | } 99 | }; 100 | } 101 | } 102 | 103 | /** 104 | * 初始化服务 105 | */ 106 | @ReactMethod 107 | public void init(){ 108 | initTraceService(); 109 | } 110 | /** 111 | * 开始鹰眼追踪服务 112 | */ 113 | @ReactMethod 114 | public void startTrace(){ 115 | 116 | // 开启服务 117 | mTraceClient.startTrace(mTrace, mTraceListener); 118 | // 开启采集 119 | mTraceClient.startGather(mTraceListener); 120 | 121 | } 122 | 123 | /** 124 | * 停止鹰眼追踪服务 125 | */ 126 | @ReactMethod 127 | public void stopTrace(){ 128 | // 停止服务 129 | if(mTrace != null && mTraceListener != null){ 130 | mTraceClient.stopTrace(mTrace, mTraceListener); 131 | mTrace = null; 132 | // 停止采集 133 | mTraceClient.stopGather(mTraceListener); 134 | mTraceListener = null; 135 | } 136 | 137 | } 138 | 139 | /** 140 | * 查询轨迹 141 | */ 142 | @ReactMethod 143 | public void getTraces(double startTraceTime){ 144 | // 请求标识 145 | int tag = 1; 146 | // 轨迹服务ID 147 | long serviceId = 138750; 148 | // 设备标识 149 | String entityName = "reactNativeMap"; 150 | // 创建历史轨迹请求实例 151 | HistoryTrackRequest historyTrackRequest = new HistoryTrackRequest(tag, serviceId, entityName); 152 | 153 | //设置轨迹查询起止时间/ 这里的时间应该由js传入过来 154 | // 开始时间(单位:秒) 155 | long startTime = (long)startTraceTime / 1000 - 12 * 60 * 60; 156 | // 结束时间(单位:秒) 157 | long endTime = System.currentTimeMillis() / 1000; 158 | // 设置开始时间 159 | historyTrackRequest.setStartTime(startTime); 160 | // 设置结束时间 161 | historyTrackRequest.setEndTime(endTime); 162 | 163 | 164 | // 初始化轨迹监听器 165 | OnTrackListener mTrackListener = new OnTrackListener() { 166 | // 历史轨迹回调 167 | @Override 168 | public void onHistoryTrackCallback(HistoryTrackResponse response) { 169 | //这里将数据,返回给js,然后由js传入地图做展示? 170 | WritableMap params = Arguments.createMap(); 171 | params.putDouble("distance", response.getDistance()); 172 | params.putDouble("speed", response.getEndPoint().getSpeed()); 173 | sendEvent("onHistoryTrackCallback", params); 174 | } 175 | 176 | public void onQueryHistoryTrackCallback(String message) { 177 | Log.i("Tag", message); 178 | // 解析并保存轨迹信息 179 | } 180 | }; 181 | 182 | // 查询历史轨迹 183 | mTraceClient.queryHistoryTrack(historyTrackRequest, mTrackListener); 184 | 185 | } 186 | 187 | } 188 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/wxapi/WXEntryActivity.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap.wxapi; 2 | 3 | /** 4 | * Created by zachrey on 2017/4/25. 5 | */ 6 | 7 | import android.app.Activity; 8 | import android.os.Bundle; 9 | import com.theweflex.react.WeChatModule; 10 | 11 | 12 | public class WXEntryActivity extends Activity{ 13 | @Override 14 | protected void onCreate(Bundle savedInstanceState) { 15 | super.onCreate(savedInstanceState); 16 | WeChatModule.handleIntent(getIntent()); 17 | finish(); 18 | } 19 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativemap/wxapi/WXPayEntryActivity.java: -------------------------------------------------------------------------------- 1 | package com.reactnativemap.wxapi; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import com.theweflex.react.WeChatModule; 6 | 7 | public class WXPayEntryActivity extends Activity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | WeChatModule.handleIntent(getIntent()); 12 | finish(); 13 | } 14 | } -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_map_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_map_v4_3_0.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/arm64-v8a/libBaiduTraceSDK_v3_0_1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/arm64-v8a/libBaiduTraceSDK_v3_0_1.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/arm64-v8a/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/arm64-v8a/liblocSDK7a.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_map_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_map_v4_3_0.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi-v7a/libBaiduTraceSDK_v3_0_1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/armeabi-v7a/libBaiduTraceSDK_v3_0_1.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi-v7a/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/armeabi-v7a/liblocSDK7a.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/armeabi/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi/libBaiduMapSDK_map_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/armeabi/libBaiduMapSDK_map_v4_3_0.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi/libBaiduTraceSDK_v3_0_1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/armeabi/libBaiduTraceSDK_v3_0_1.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/armeabi/liblocSDK7a.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/x86/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/x86/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/x86/libBaiduMapSDK_map_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/x86/libBaiduMapSDK_map_v4_3_0.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/x86/libBaiduTraceSDK_v3_0_1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/x86/libBaiduTraceSDK_v3_0_1.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/x86/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/x86/liblocSDK7a.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/x86_64/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/x86_64/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/x86_64/libBaiduMapSDK_map_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/x86_64/libBaiduMapSDK_map_v4_3_0.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/x86_64/libBaiduTraceSDK_v3_0_1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/x86_64/libBaiduTraceSDK_v3_0_1.so -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/x86_64/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/jniLibs/x86_64/liblocSDK7a.so -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/drawable-hdpi/node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/node_modules_reactnavigation_src_views_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/drawable-hdpi/node_modules_reactnavigation_src_views_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/images_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/drawable-mdpi/images_run.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/drawable-mdpi/node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_src_views_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_src_views_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/drawable-xhdpi/node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigation_src_views_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigation_src_views_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/drawable-xxhdpi/node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigation_src_views_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigation_src_views_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnative_libraries_customcomponents_navigationexperimental_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnavigation_src_views_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnavigation_src_views_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/marker_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/mipmap-hdpi/marker_end.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/marker_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/mipmap-hdpi/marker_start.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/popup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/mipmap-hdpi/popup.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/mipmap-hdpi/run.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/mipmap-hdpi/running.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Running 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.2.3' 9 | // NOTE: Do not place your application dependencies here; they belong 10 | // in the individual module build.gradle files 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | mavenLocal() 17 | jcenter() 18 | maven { 19 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 20 | url "$rootDir/../node_modules/react-native/android" 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | android.useDeprecatedNdk=true 20 | MYAPP_RELEASE_STORE_FILE=android-key.jks 21 | MYAPP_RELEASE_KEY_ALIAS=android-key 22 | MYAPP_RELEASE_STORE_PASSWORD=zhangzhe 23 | MYAPP_RELEASE_KEY_PASSWORD=zhangzhe -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = "debug", 3 | properties = "debug.keystore.properties", 4 | store = "debug.keystore", 5 | visibility = [ 6 | "PUBLIC", 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | include ':RCTWeChat' 3 | project(':RCTWeChat').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-wechat/android') -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reactNativeMap", 3 | "displayName": "reactNativeMap" 4 | } -------------------------------------------------------------------------------- /images/Home2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/images/Home2.jpg -------------------------------------------------------------------------------- /images/List.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/images/List.jpg -------------------------------------------------------------------------------- /images/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/images/list.png -------------------------------------------------------------------------------- /images/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/images/run.png -------------------------------------------------------------------------------- /images/share.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/images/share.jpg -------------------------------------------------------------------------------- /images/trace.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/images/trace.jpg -------------------------------------------------------------------------------- /images/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bruce-16/reactNativeMap/e42f6af5cdc557298cc892942fe9f4ca3c19e436/images/wechat.jpg -------------------------------------------------------------------------------- /index.android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry 10 | } from 'react-native'; 11 | 12 | import App from './App'; 13 | 14 | AppRegistry.registerComponent('reactNativeMap', () => App); 15 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry 10 | } from 'react-native'; 11 | 12 | import App from './App'; 13 | 14 | AppRegistry.registerComponent('reactNativeMap', () => App); 15 | -------------------------------------------------------------------------------- /ios/reactNativeMap-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /ios/reactNativeMap-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/reactNativeMap.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | /* Begin PBXBuildFile section */ 9 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 10 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 11 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 12 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 13 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 14 | 00E356F31AD99517003FC87E /* reactNativeMapTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* reactNativeMapTests.m */; }; 15 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 16 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 17 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 18 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 19 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 20 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 21 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 22 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 23 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 24 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 25 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 26 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 27 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */; }; 28 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; 29 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; 30 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; }; 31 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; }; 32 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; 33 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; 34 | 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; }; 35 | 2DCD954D1E0B4F2C00145EB5 /* reactNativeMapTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* reactNativeMapTests.m */; }; 36 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 37 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 38 | 3813CC1F4F7A4E0897FF7FBF /* libRCTBaiduMap.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A006F6A38BF847E29EAD6753 /* libRCTBaiduMap.a */; }; 39 | 81E2E010284044E994619B02 /* libRCTWeChat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9377007BED8C4E1AA729C78E /* libRCTWeChat.a */; }; 40 | /* End PBXBuildFile section */ 41 | 42 | /* Begin PBXContainerItemProxy section */ 43 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 46 | proxyType = 2; 47 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 48 | remoteInfo = RCTActionSheet; 49 | }; 50 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 51 | isa = PBXContainerItemProxy; 52 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 53 | proxyType = 2; 54 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 55 | remoteInfo = RCTGeolocation; 56 | }; 57 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 58 | isa = PBXContainerItemProxy; 59 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 60 | proxyType = 2; 61 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 62 | remoteInfo = RCTImage; 63 | }; 64 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 65 | isa = PBXContainerItemProxy; 66 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 67 | proxyType = 2; 68 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 69 | remoteInfo = RCTNetwork; 70 | }; 71 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 72 | isa = PBXContainerItemProxy; 73 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 74 | proxyType = 2; 75 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 76 | remoteInfo = RCTVibration; 77 | }; 78 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 79 | isa = PBXContainerItemProxy; 80 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 81 | proxyType = 1; 82 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 83 | remoteInfo = reactNativeMap; 84 | }; 85 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 86 | isa = PBXContainerItemProxy; 87 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 88 | proxyType = 2; 89 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 90 | remoteInfo = RCTSettings; 91 | }; 92 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 93 | isa = PBXContainerItemProxy; 94 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 95 | proxyType = 2; 96 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 97 | remoteInfo = RCTWebSocket; 98 | }; 99 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 100 | isa = PBXContainerItemProxy; 101 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 102 | proxyType = 2; 103 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 104 | remoteInfo = React; 105 | }; 106 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { 107 | isa = PBXContainerItemProxy; 108 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 109 | proxyType = 1; 110 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; 111 | remoteInfo = "reactNativeMap-tvOS"; 112 | }; 113 | 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { 114 | isa = PBXContainerItemProxy; 115 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 116 | proxyType = 2; 117 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; 118 | remoteInfo = "RCTImage-tvOS"; 119 | }; 120 | 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { 121 | isa = PBXContainerItemProxy; 122 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 123 | proxyType = 2; 124 | remoteGlobalIDString = 2D2A28471D9B043800D4039D; 125 | remoteInfo = "RCTLinking-tvOS"; 126 | }; 127 | 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 128 | isa = PBXContainerItemProxy; 129 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 130 | proxyType = 2; 131 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D; 132 | remoteInfo = "RCTNetwork-tvOS"; 133 | }; 134 | 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 135 | isa = PBXContainerItemProxy; 136 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 137 | proxyType = 2; 138 | remoteGlobalIDString = 2D2A28611D9B046600D4039D; 139 | remoteInfo = "RCTSettings-tvOS"; 140 | }; 141 | 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { 142 | isa = PBXContainerItemProxy; 143 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 144 | proxyType = 2; 145 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D; 146 | remoteInfo = "RCTText-tvOS"; 147 | }; 148 | 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { 149 | isa = PBXContainerItemProxy; 150 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 151 | proxyType = 2; 152 | remoteGlobalIDString = 2D2A28881D9B049200D4039D; 153 | remoteInfo = "RCTWebSocket-tvOS"; 154 | }; 155 | 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { 156 | isa = PBXContainerItemProxy; 157 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 158 | proxyType = 2; 159 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D; 160 | remoteInfo = "React-tvOS"; 161 | }; 162 | 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { 163 | isa = PBXContainerItemProxy; 164 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 165 | proxyType = 2; 166 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA; 167 | remoteInfo = yoga; 168 | }; 169 | 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { 170 | isa = PBXContainerItemProxy; 171 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 172 | proxyType = 2; 173 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA; 174 | remoteInfo = "yoga-tvOS"; 175 | }; 176 | 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { 177 | isa = PBXContainerItemProxy; 178 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 179 | proxyType = 2; 180 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; 181 | remoteInfo = cxxreact; 182 | }; 183 | 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 184 | isa = PBXContainerItemProxy; 185 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 186 | proxyType = 2; 187 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; 188 | remoteInfo = "cxxreact-tvOS"; 189 | }; 190 | 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 191 | isa = PBXContainerItemProxy; 192 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 193 | proxyType = 2; 194 | remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; 195 | remoteInfo = jschelpers; 196 | }; 197 | 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 198 | isa = PBXContainerItemProxy; 199 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 200 | proxyType = 2; 201 | remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; 202 | remoteInfo = "jschelpers-tvOS"; 203 | }; 204 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 205 | isa = PBXContainerItemProxy; 206 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 207 | proxyType = 2; 208 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 209 | remoteInfo = RCTAnimation; 210 | }; 211 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 212 | isa = PBXContainerItemProxy; 213 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 214 | proxyType = 2; 215 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D; 216 | remoteInfo = "RCTAnimation-tvOS"; 217 | }; 218 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 219 | isa = PBXContainerItemProxy; 220 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 221 | proxyType = 2; 222 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 223 | remoteInfo = RCTLinking; 224 | }; 225 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 226 | isa = PBXContainerItemProxy; 227 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 228 | proxyType = 2; 229 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 230 | remoteInfo = RCTText; 231 | }; 232 | /* End PBXContainerItemProxy section */ 233 | 234 | /* Begin PBXFileReference section */ 235 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 236 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 237 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 238 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 239 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 240 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 241 | 00E356EE1AD99517003FC87E /* reactNativeMapTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = reactNativeMapTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 242 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 243 | 00E356F21AD99517003FC87E /* reactNativeMapTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = reactNativeMapTests.m; sourceTree = ""; }; 244 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 245 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 246 | 13B07F961A680F5B00A75B9A /* reactNativeMap.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = reactNativeMap.app; sourceTree = BUILT_PRODUCTS_DIR; }; 247 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = reactNativeMap/AppDelegate.h; sourceTree = ""; }; 248 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = reactNativeMap/AppDelegate.m; sourceTree = ""; }; 249 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 250 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = reactNativeMap/Images.xcassets; sourceTree = ""; }; 251 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = reactNativeMap/Info.plist; sourceTree = ""; }; 252 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = reactNativeMap/main.m; sourceTree = ""; }; 253 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 254 | 2D02E47B1E0B4A5D006451C7 /* reactNativeMap-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "reactNativeMap-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 255 | 2D02E4901E0B4A5D006451C7 /* reactNativeMap-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "reactNativeMap-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 256 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 257 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 258 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 259 | 442E92C7EE45431496CE3C52 /* RCTBaiduMap.xcodeproj */ = {isa = PBXFileReference; name = "RCTBaiduMap.xcodeproj"; path = "../node_modules/react-native-baidu-map/ios/RCTBaiduMap.xcodeproj"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; }; 260 | A006F6A38BF847E29EAD6753 /* libRCTBaiduMap.a */ = {isa = PBXFileReference; name = "libRCTBaiduMap.a"; path = "libRCTBaiduMap.a"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; }; 261 | C7054330355F4736B1CFCAC9 /* RCTWeChat.xcodeproj */ = {isa = PBXFileReference; name = "RCTWeChat.xcodeproj"; path = "../node_modules/react-native-wechat/ios/RCTWeChat.xcodeproj"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; }; 262 | 9377007BED8C4E1AA729C78E /* libRCTWeChat.a */ = {isa = PBXFileReference; name = "libRCTWeChat.a"; path = "libRCTWeChat.a"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; }; 263 | /* End PBXFileReference section */ 264 | 265 | /* Begin PBXFrameworksBuildPhase section */ 266 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 267 | isa = PBXFrameworksBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 275 | isa = PBXFrameworksBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 279 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 280 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 281 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 282 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 283 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 284 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 285 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 286 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 287 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 288 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 289 | 3813CC1F4F7A4E0897FF7FBF /* libRCTBaiduMap.a in Frameworks */, 290 | 81E2E010284044E994619B02 /* libRCTWeChat.a in Frameworks */, 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | }; 294 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { 295 | isa = PBXFrameworksBuildPhase; 296 | buildActionMask = 2147483647; 297 | files = ( 298 | 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */, 299 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */, 300 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, 301 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, 302 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, 303 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, 304 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, 305 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, 306 | ); 307 | runOnlyForDeploymentPostprocessing = 0; 308 | }; 309 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { 310 | isa = PBXFrameworksBuildPhase; 311 | buildActionMask = 2147483647; 312 | files = ( 313 | ); 314 | runOnlyForDeploymentPostprocessing = 0; 315 | }; 316 | /* End PBXFrameworksBuildPhase section */ 317 | 318 | /* Begin PBXGroup section */ 319 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 320 | isa = PBXGroup; 321 | children = ( 322 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 323 | ); 324 | name = Products; 325 | sourceTree = ""; 326 | }; 327 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 328 | isa = PBXGroup; 329 | children = ( 330 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 331 | ); 332 | name = Products; 333 | sourceTree = ""; 334 | }; 335 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 336 | isa = PBXGroup; 337 | children = ( 338 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 339 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, 340 | ); 341 | name = Products; 342 | sourceTree = ""; 343 | }; 344 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 345 | isa = PBXGroup; 346 | children = ( 347 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 348 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, 349 | ); 350 | name = Products; 351 | sourceTree = ""; 352 | }; 353 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 354 | isa = PBXGroup; 355 | children = ( 356 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 357 | ); 358 | name = Products; 359 | sourceTree = ""; 360 | }; 361 | 00E356EF1AD99517003FC87E /* reactNativeMapTests */ = { 362 | isa = PBXGroup; 363 | children = ( 364 | 00E356F21AD99517003FC87E /* reactNativeMapTests.m */, 365 | 00E356F01AD99517003FC87E /* Supporting Files */, 366 | ); 367 | path = reactNativeMapTests; 368 | sourceTree = ""; 369 | }; 370 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 371 | isa = PBXGroup; 372 | children = ( 373 | 00E356F11AD99517003FC87E /* Info.plist */, 374 | ); 375 | name = "Supporting Files"; 376 | sourceTree = ""; 377 | }; 378 | 139105B71AF99BAD00B5F7CC /* Products */ = { 379 | isa = PBXGroup; 380 | children = ( 381 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 382 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, 383 | ); 384 | name = Products; 385 | sourceTree = ""; 386 | }; 387 | 139FDEE71B06529A00C62182 /* Products */ = { 388 | isa = PBXGroup; 389 | children = ( 390 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 391 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, 392 | ); 393 | name = Products; 394 | sourceTree = ""; 395 | }; 396 | 13B07FAE1A68108700A75B9A /* reactNativeMap */ = { 397 | isa = PBXGroup; 398 | children = ( 399 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 400 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 401 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 402 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 403 | 13B07FB61A68108700A75B9A /* Info.plist */, 404 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 405 | 13B07FB71A68108700A75B9A /* main.m */, 406 | ); 407 | name = reactNativeMap; 408 | sourceTree = ""; 409 | }; 410 | 146834001AC3E56700842450 /* Products */ = { 411 | isa = PBXGroup; 412 | children = ( 413 | 146834041AC3E56700842450 /* libReact.a */, 414 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */, 415 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, 416 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, 417 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, 418 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, 419 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, 420 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, 421 | ); 422 | name = Products; 423 | sourceTree = ""; 424 | }; 425 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = { 426 | isa = PBXGroup; 427 | children = ( 428 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, 429 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */, 430 | ); 431 | name = Products; 432 | sourceTree = ""; 433 | }; 434 | 78C398B11ACF4ADC00677621 /* Products */ = { 435 | isa = PBXGroup; 436 | children = ( 437 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 438 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, 439 | ); 440 | name = Products; 441 | sourceTree = ""; 442 | }; 443 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 444 | isa = PBXGroup; 445 | children = ( 446 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 447 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 448 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 449 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 450 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 451 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 452 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 453 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 454 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 455 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 456 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 457 | 442E92C7EE45431496CE3C52 /* RCTBaiduMap.xcodeproj */, 458 | C7054330355F4736B1CFCAC9 /* RCTWeChat.xcodeproj */, 459 | ); 460 | name = Libraries; 461 | sourceTree = ""; 462 | }; 463 | 832341B11AAA6A8300B99B32 /* Products */ = { 464 | isa = PBXGroup; 465 | children = ( 466 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 467 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, 468 | ); 469 | name = Products; 470 | sourceTree = ""; 471 | }; 472 | 83CBB9F61A601CBA00E9B192 = { 473 | isa = PBXGroup; 474 | children = ( 475 | 13B07FAE1A68108700A75B9A /* reactNativeMap */, 476 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 477 | 00E356EF1AD99517003FC87E /* reactNativeMapTests */, 478 | 83CBBA001A601CBA00E9B192 /* Products */, 479 | ); 480 | indentWidth = 2; 481 | sourceTree = ""; 482 | tabWidth = 2; 483 | }; 484 | 83CBBA001A601CBA00E9B192 /* Products */ = { 485 | isa = PBXGroup; 486 | children = ( 487 | 13B07F961A680F5B00A75B9A /* reactNativeMap.app */, 488 | 00E356EE1AD99517003FC87E /* reactNativeMapTests.xctest */, 489 | 2D02E47B1E0B4A5D006451C7 /* reactNativeMap-tvOS.app */, 490 | 2D02E4901E0B4A5D006451C7 /* reactNativeMap-tvOSTests.xctest */, 491 | ); 492 | name = Products; 493 | sourceTree = ""; 494 | }; 495 | /* End PBXGroup section */ 496 | 497 | /* Begin PBXNativeTarget section */ 498 | 00E356ED1AD99517003FC87E /* reactNativeMapTests */ = { 499 | isa = PBXNativeTarget; 500 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "reactNativeMapTests" */; 501 | buildPhases = ( 502 | 00E356EA1AD99517003FC87E /* Sources */, 503 | 00E356EB1AD99517003FC87E /* Frameworks */, 504 | 00E356EC1AD99517003FC87E /* Resources */, 505 | ); 506 | buildRules = ( 507 | ); 508 | dependencies = ( 509 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 510 | ); 511 | name = reactNativeMapTests; 512 | productName = reactNativeMapTests; 513 | productReference = 00E356EE1AD99517003FC87E /* reactNativeMapTests.xctest */; 514 | productType = "com.apple.product-type.bundle.unit-test"; 515 | }; 516 | 13B07F861A680F5B00A75B9A /* reactNativeMap */ = { 517 | isa = PBXNativeTarget; 518 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "reactNativeMap" */; 519 | buildPhases = ( 520 | 13B07F871A680F5B00A75B9A /* Sources */, 521 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 522 | 13B07F8E1A680F5B00A75B9A /* Resources */, 523 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 524 | ); 525 | buildRules = ( 526 | ); 527 | dependencies = ( 528 | ); 529 | name = reactNativeMap; 530 | productName = "Hello World"; 531 | productReference = 13B07F961A680F5B00A75B9A /* reactNativeMap.app */; 532 | productType = "com.apple.product-type.application"; 533 | }; 534 | 2D02E47A1E0B4A5D006451C7 /* reactNativeMap-tvOS */ = { 535 | isa = PBXNativeTarget; 536 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "reactNativeMap-tvOS" */; 537 | buildPhases = ( 538 | 2D02E4771E0B4A5D006451C7 /* Sources */, 539 | 2D02E4781E0B4A5D006451C7 /* Frameworks */, 540 | 2D02E4791E0B4A5D006451C7 /* Resources */, 541 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, 542 | ); 543 | buildRules = ( 544 | ); 545 | dependencies = ( 546 | ); 547 | name = "reactNativeMap-tvOS"; 548 | productName = "reactNativeMap-tvOS"; 549 | productReference = 2D02E47B1E0B4A5D006451C7 /* reactNativeMap-tvOS.app */; 550 | productType = "com.apple.product-type.application"; 551 | }; 552 | 2D02E48F1E0B4A5D006451C7 /* reactNativeMap-tvOSTests */ = { 553 | isa = PBXNativeTarget; 554 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "reactNativeMap-tvOSTests" */; 555 | buildPhases = ( 556 | 2D02E48C1E0B4A5D006451C7 /* Sources */, 557 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */, 558 | 2D02E48E1E0B4A5D006451C7 /* Resources */, 559 | ); 560 | buildRules = ( 561 | ); 562 | dependencies = ( 563 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, 564 | ); 565 | name = "reactNativeMap-tvOSTests"; 566 | productName = "reactNativeMap-tvOSTests"; 567 | productReference = 2D02E4901E0B4A5D006451C7 /* reactNativeMap-tvOSTests.xctest */; 568 | productType = "com.apple.product-type.bundle.unit-test"; 569 | }; 570 | /* End PBXNativeTarget section */ 571 | 572 | /* Begin PBXProject section */ 573 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 574 | isa = PBXProject; 575 | attributes = { 576 | LastUpgradeCheck = 610; 577 | ORGANIZATIONNAME = Facebook; 578 | TargetAttributes = { 579 | 00E356ED1AD99517003FC87E = { 580 | CreatedOnToolsVersion = 6.2; 581 | TestTargetID = 13B07F861A680F5B00A75B9A; 582 | }; 583 | 2D02E47A1E0B4A5D006451C7 = { 584 | CreatedOnToolsVersion = 8.2.1; 585 | ProvisioningStyle = Automatic; 586 | }; 587 | 2D02E48F1E0B4A5D006451C7 = { 588 | CreatedOnToolsVersion = 8.2.1; 589 | ProvisioningStyle = Automatic; 590 | TestTargetID = 2D02E47A1E0B4A5D006451C7; 591 | }; 592 | }; 593 | }; 594 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "reactNativeMap" */; 595 | compatibilityVersion = "Xcode 3.2"; 596 | developmentRegion = English; 597 | hasScannedForEncodings = 0; 598 | knownRegions = ( 599 | en, 600 | Base, 601 | ); 602 | mainGroup = 83CBB9F61A601CBA00E9B192; 603 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 604 | projectDirPath = ""; 605 | projectReferences = ( 606 | { 607 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 608 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 609 | }, 610 | { 611 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; 612 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 613 | }, 614 | { 615 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 616 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 617 | }, 618 | { 619 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 620 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 621 | }, 622 | { 623 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 624 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 625 | }, 626 | { 627 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 628 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 629 | }, 630 | { 631 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 632 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 633 | }, 634 | { 635 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 636 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 637 | }, 638 | { 639 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 640 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 641 | }, 642 | { 643 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 644 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 645 | }, 646 | { 647 | ProductGroup = 146834001AC3E56700842450 /* Products */; 648 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 649 | }, 650 | ); 651 | projectRoot = ""; 652 | targets = ( 653 | 13B07F861A680F5B00A75B9A /* reactNativeMap */, 654 | 00E356ED1AD99517003FC87E /* reactNativeMapTests */, 655 | 2D02E47A1E0B4A5D006451C7 /* reactNativeMap-tvOS */, 656 | 2D02E48F1E0B4A5D006451C7 /* reactNativeMap-tvOSTests */, 657 | ); 658 | }; 659 | /* End PBXProject section */ 660 | 661 | /* Begin PBXReferenceProxy section */ 662 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 663 | isa = PBXReferenceProxy; 664 | fileType = archive.ar; 665 | path = libRCTActionSheet.a; 666 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 667 | sourceTree = BUILT_PRODUCTS_DIR; 668 | }; 669 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 670 | isa = PBXReferenceProxy; 671 | fileType = archive.ar; 672 | path = libRCTGeolocation.a; 673 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 674 | sourceTree = BUILT_PRODUCTS_DIR; 675 | }; 676 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 677 | isa = PBXReferenceProxy; 678 | fileType = archive.ar; 679 | path = libRCTImage.a; 680 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 681 | sourceTree = BUILT_PRODUCTS_DIR; 682 | }; 683 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 684 | isa = PBXReferenceProxy; 685 | fileType = archive.ar; 686 | path = libRCTNetwork.a; 687 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 688 | sourceTree = BUILT_PRODUCTS_DIR; 689 | }; 690 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 691 | isa = PBXReferenceProxy; 692 | fileType = archive.ar; 693 | path = libRCTVibration.a; 694 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 695 | sourceTree = BUILT_PRODUCTS_DIR; 696 | }; 697 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 698 | isa = PBXReferenceProxy; 699 | fileType = archive.ar; 700 | path = libRCTSettings.a; 701 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 702 | sourceTree = BUILT_PRODUCTS_DIR; 703 | }; 704 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 705 | isa = PBXReferenceProxy; 706 | fileType = archive.ar; 707 | path = libRCTWebSocket.a; 708 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 709 | sourceTree = BUILT_PRODUCTS_DIR; 710 | }; 711 | 146834041AC3E56700842450 /* libReact.a */ = { 712 | isa = PBXReferenceProxy; 713 | fileType = archive.ar; 714 | path = libReact.a; 715 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 716 | sourceTree = BUILT_PRODUCTS_DIR; 717 | }; 718 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { 719 | isa = PBXReferenceProxy; 720 | fileType = archive.ar; 721 | path = "libRCTImage-tvOS.a"; 722 | remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; 723 | sourceTree = BUILT_PRODUCTS_DIR; 724 | }; 725 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { 726 | isa = PBXReferenceProxy; 727 | fileType = archive.ar; 728 | path = "libRCTLinking-tvOS.a"; 729 | remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; 730 | sourceTree = BUILT_PRODUCTS_DIR; 731 | }; 732 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { 733 | isa = PBXReferenceProxy; 734 | fileType = archive.ar; 735 | path = "libRCTNetwork-tvOS.a"; 736 | remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; 737 | sourceTree = BUILT_PRODUCTS_DIR; 738 | }; 739 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { 740 | isa = PBXReferenceProxy; 741 | fileType = archive.ar; 742 | path = "libRCTSettings-tvOS.a"; 743 | remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; 744 | sourceTree = BUILT_PRODUCTS_DIR; 745 | }; 746 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { 747 | isa = PBXReferenceProxy; 748 | fileType = archive.ar; 749 | path = "libRCTText-tvOS.a"; 750 | remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; 751 | sourceTree = BUILT_PRODUCTS_DIR; 752 | }; 753 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { 754 | isa = PBXReferenceProxy; 755 | fileType = archive.ar; 756 | path = "libRCTWebSocket-tvOS.a"; 757 | remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; 758 | sourceTree = BUILT_PRODUCTS_DIR; 759 | }; 760 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = { 761 | isa = PBXReferenceProxy; 762 | fileType = archive.ar; 763 | path = libReact.a; 764 | remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; 765 | sourceTree = BUILT_PRODUCTS_DIR; 766 | }; 767 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { 768 | isa = PBXReferenceProxy; 769 | fileType = archive.ar; 770 | path = libyoga.a; 771 | remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; 772 | sourceTree = BUILT_PRODUCTS_DIR; 773 | }; 774 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { 775 | isa = PBXReferenceProxy; 776 | fileType = archive.ar; 777 | path = libyoga.a; 778 | remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; 779 | sourceTree = BUILT_PRODUCTS_DIR; 780 | }; 781 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { 782 | isa = PBXReferenceProxy; 783 | fileType = archive.ar; 784 | path = libcxxreact.a; 785 | remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; 786 | sourceTree = BUILT_PRODUCTS_DIR; 787 | }; 788 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { 789 | isa = PBXReferenceProxy; 790 | fileType = archive.ar; 791 | path = libcxxreact.a; 792 | remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; 793 | sourceTree = BUILT_PRODUCTS_DIR; 794 | }; 795 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { 796 | isa = PBXReferenceProxy; 797 | fileType = archive.ar; 798 | path = libjschelpers.a; 799 | remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; 800 | sourceTree = BUILT_PRODUCTS_DIR; 801 | }; 802 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { 803 | isa = PBXReferenceProxy; 804 | fileType = archive.ar; 805 | path = libjschelpers.a; 806 | remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; 807 | sourceTree = BUILT_PRODUCTS_DIR; 808 | }; 809 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 810 | isa = PBXReferenceProxy; 811 | fileType = archive.ar; 812 | path = libRCTAnimation.a; 813 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 814 | sourceTree = BUILT_PRODUCTS_DIR; 815 | }; 816 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = { 817 | isa = PBXReferenceProxy; 818 | fileType = archive.ar; 819 | path = "libRCTAnimation-tvOS.a"; 820 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 821 | sourceTree = BUILT_PRODUCTS_DIR; 822 | }; 823 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 824 | isa = PBXReferenceProxy; 825 | fileType = archive.ar; 826 | path = libRCTLinking.a; 827 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 828 | sourceTree = BUILT_PRODUCTS_DIR; 829 | }; 830 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 831 | isa = PBXReferenceProxy; 832 | fileType = archive.ar; 833 | path = libRCTText.a; 834 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 835 | sourceTree = BUILT_PRODUCTS_DIR; 836 | }; 837 | /* End PBXReferenceProxy section */ 838 | 839 | /* Begin PBXResourcesBuildPhase section */ 840 | 00E356EC1AD99517003FC87E /* Resources */ = { 841 | isa = PBXResourcesBuildPhase; 842 | buildActionMask = 2147483647; 843 | files = ( 844 | ); 845 | runOnlyForDeploymentPostprocessing = 0; 846 | }; 847 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 848 | isa = PBXResourcesBuildPhase; 849 | buildActionMask = 2147483647; 850 | files = ( 851 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 852 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 853 | ); 854 | runOnlyForDeploymentPostprocessing = 0; 855 | }; 856 | 2D02E4791E0B4A5D006451C7 /* Resources */ = { 857 | isa = PBXResourcesBuildPhase; 858 | buildActionMask = 2147483647; 859 | files = ( 860 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, 861 | ); 862 | runOnlyForDeploymentPostprocessing = 0; 863 | }; 864 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = { 865 | isa = PBXResourcesBuildPhase; 866 | buildActionMask = 2147483647; 867 | files = ( 868 | ); 869 | runOnlyForDeploymentPostprocessing = 0; 870 | }; 871 | /* End PBXResourcesBuildPhase section */ 872 | 873 | /* Begin PBXShellScriptBuildPhase section */ 874 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 875 | isa = PBXShellScriptBuildPhase; 876 | buildActionMask = 2147483647; 877 | files = ( 878 | ); 879 | inputPaths = ( 880 | ); 881 | name = "Bundle React Native code and images"; 882 | outputPaths = ( 883 | ); 884 | runOnlyForDeploymentPostprocessing = 0; 885 | shellPath = /bin/sh; 886 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh"; 887 | }; 888 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { 889 | isa = PBXShellScriptBuildPhase; 890 | buildActionMask = 2147483647; 891 | files = ( 892 | ); 893 | inputPaths = ( 894 | ); 895 | name = "Bundle React Native Code And Images"; 896 | outputPaths = ( 897 | ); 898 | runOnlyForDeploymentPostprocessing = 0; 899 | shellPath = /bin/sh; 900 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh"; 901 | }; 902 | /* End PBXShellScriptBuildPhase section */ 903 | 904 | /* Begin PBXSourcesBuildPhase section */ 905 | 00E356EA1AD99517003FC87E /* Sources */ = { 906 | isa = PBXSourcesBuildPhase; 907 | buildActionMask = 2147483647; 908 | files = ( 909 | 00E356F31AD99517003FC87E /* reactNativeMapTests.m in Sources */, 910 | ); 911 | runOnlyForDeploymentPostprocessing = 0; 912 | }; 913 | 13B07F871A680F5B00A75B9A /* Sources */ = { 914 | isa = PBXSourcesBuildPhase; 915 | buildActionMask = 2147483647; 916 | files = ( 917 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 918 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 919 | ); 920 | runOnlyForDeploymentPostprocessing = 0; 921 | }; 922 | 2D02E4771E0B4A5D006451C7 /* Sources */ = { 923 | isa = PBXSourcesBuildPhase; 924 | buildActionMask = 2147483647; 925 | files = ( 926 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, 927 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, 928 | ); 929 | runOnlyForDeploymentPostprocessing = 0; 930 | }; 931 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = { 932 | isa = PBXSourcesBuildPhase; 933 | buildActionMask = 2147483647; 934 | files = ( 935 | 2DCD954D1E0B4F2C00145EB5 /* reactNativeMapTests.m in Sources */, 936 | ); 937 | runOnlyForDeploymentPostprocessing = 0; 938 | }; 939 | /* End PBXSourcesBuildPhase section */ 940 | 941 | /* Begin PBXTargetDependency section */ 942 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 943 | isa = PBXTargetDependency; 944 | target = 13B07F861A680F5B00A75B9A /* reactNativeMap */; 945 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 946 | }; 947 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { 948 | isa = PBXTargetDependency; 949 | target = 2D02E47A1E0B4A5D006451C7 /* reactNativeMap-tvOS */; 950 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; 951 | }; 952 | /* End PBXTargetDependency section */ 953 | 954 | /* Begin PBXVariantGroup section */ 955 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 956 | isa = PBXVariantGroup; 957 | children = ( 958 | 13B07FB21A68108700A75B9A /* Base */, 959 | ); 960 | name = LaunchScreen.xib; 961 | path = reactNativeMap; 962 | sourceTree = ""; 963 | }; 964 | /* End PBXVariantGroup section */ 965 | 966 | /* Begin XCBuildConfiguration section */ 967 | 00E356F61AD99517003FC87E /* Debug */ = { 968 | isa = XCBuildConfiguration; 969 | buildSettings = { 970 | BUNDLE_LOADER = "$(TEST_HOST)"; 971 | GCC_PREPROCESSOR_DEFINITIONS = ( 972 | "DEBUG=1", 973 | "$(inherited)", 974 | ); 975 | INFOPLIST_FILE = reactNativeMapTests/Info.plist; 976 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 977 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 978 | OTHER_LDFLAGS = ( 979 | "-ObjC", 980 | "-lc++", 981 | ); 982 | PRODUCT_NAME = "$(TARGET_NAME)"; 983 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reactNativeMap.app/reactNativeMap"; 984 | LIBRARY_SEARCH_PATHS = ( 985 | "$(inherited)", 986 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 987 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 988 | ); 989 | HEADER_SEARCH_PATHS = ( 990 | "$(inherited)", 991 | "$(SRCROOT)\..\node_modules\react-native-baidu-map\ios\RCTBaiduMap/**", 992 | "$(SRCROOT)\..\node_modules\react-native-wechat\ios", 993 | ); 994 | }; 995 | name = Debug; 996 | }; 997 | 00E356F71AD99517003FC87E /* Release */ = { 998 | isa = XCBuildConfiguration; 999 | buildSettings = { 1000 | BUNDLE_LOADER = "$(TEST_HOST)"; 1001 | COPY_PHASE_STRIP = NO; 1002 | INFOPLIST_FILE = reactNativeMapTests/Info.plist; 1003 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1004 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1005 | OTHER_LDFLAGS = ( 1006 | "-ObjC", 1007 | "-lc++", 1008 | ); 1009 | PRODUCT_NAME = "$(TARGET_NAME)"; 1010 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reactNativeMap.app/reactNativeMap"; 1011 | LIBRARY_SEARCH_PATHS = ( 1012 | "$(inherited)", 1013 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1014 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1015 | ); 1016 | HEADER_SEARCH_PATHS = ( 1017 | "$(inherited)", 1018 | "$(SRCROOT)\..\node_modules\react-native-baidu-map\ios\RCTBaiduMap/**", 1019 | "$(SRCROOT)\..\node_modules\react-native-wechat\ios", 1020 | ); 1021 | }; 1022 | name = Release; 1023 | }; 1024 | 13B07F941A680F5B00A75B9A /* Debug */ = { 1025 | isa = XCBuildConfiguration; 1026 | buildSettings = { 1027 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1028 | CURRENT_PROJECT_VERSION = 1; 1029 | DEAD_CODE_STRIPPING = NO; 1030 | INFOPLIST_FILE = reactNativeMap/Info.plist; 1031 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1032 | OTHER_LDFLAGS = ( 1033 | "$(inherited)", 1034 | "-ObjC", 1035 | "-lc++", 1036 | ); 1037 | PRODUCT_NAME = reactNativeMap; 1038 | VERSIONING_SYSTEM = "apple-generic"; 1039 | HEADER_SEARCH_PATHS = ( 1040 | "$(inherited)", 1041 | "$(SRCROOT)\..\node_modules\react-native-baidu-map\ios\RCTBaiduMap/**", 1042 | "$(SRCROOT)\..\node_modules\react-native-wechat\ios", 1043 | ); 1044 | }; 1045 | name = Debug; 1046 | }; 1047 | 13B07F951A680F5B00A75B9A /* Release */ = { 1048 | isa = XCBuildConfiguration; 1049 | buildSettings = { 1050 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1051 | CURRENT_PROJECT_VERSION = 1; 1052 | INFOPLIST_FILE = reactNativeMap/Info.plist; 1053 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1054 | OTHER_LDFLAGS = ( 1055 | "$(inherited)", 1056 | "-ObjC", 1057 | "-lc++", 1058 | ); 1059 | PRODUCT_NAME = reactNativeMap; 1060 | VERSIONING_SYSTEM = "apple-generic"; 1061 | HEADER_SEARCH_PATHS = ( 1062 | "$(inherited)", 1063 | "$(SRCROOT)\..\node_modules\react-native-baidu-map\ios\RCTBaiduMap/**", 1064 | "$(SRCROOT)\..\node_modules\react-native-wechat\ios", 1065 | ); 1066 | }; 1067 | name = Release; 1068 | }; 1069 | 2D02E4971E0B4A5E006451C7 /* Debug */ = { 1070 | isa = XCBuildConfiguration; 1071 | buildSettings = { 1072 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1073 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1074 | CLANG_ANALYZER_NONNULL = YES; 1075 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1076 | CLANG_WARN_INFINITE_RECURSION = YES; 1077 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1078 | DEBUG_INFORMATION_FORMAT = dwarf; 1079 | ENABLE_TESTABILITY = YES; 1080 | GCC_NO_COMMON_BLOCKS = YES; 1081 | INFOPLIST_FILE = "reactNativeMap-tvOS/Info.plist"; 1082 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1083 | OTHER_LDFLAGS = ( 1084 | "-ObjC", 1085 | "-lc++", 1086 | ); 1087 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.reactNativeMap-tvOS"; 1088 | PRODUCT_NAME = "$(TARGET_NAME)"; 1089 | SDKROOT = appletvos; 1090 | TARGETED_DEVICE_FAMILY = 3; 1091 | TVOS_DEPLOYMENT_TARGET = 9.2; 1092 | LIBRARY_SEARCH_PATHS = ( 1093 | "$(inherited)", 1094 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1095 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1096 | ); 1097 | HEADER_SEARCH_PATHS = ( 1098 | "$(inherited)", 1099 | "$(SRCROOT)\..\node_modules\react-native-baidu-map\ios\RCTBaiduMap/**", 1100 | "$(SRCROOT)\..\node_modules\react-native-wechat\ios", 1101 | ); 1102 | }; 1103 | name = Debug; 1104 | }; 1105 | 2D02E4981E0B4A5E006451C7 /* Release */ = { 1106 | isa = XCBuildConfiguration; 1107 | buildSettings = { 1108 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1109 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1110 | CLANG_ANALYZER_NONNULL = YES; 1111 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1112 | CLANG_WARN_INFINITE_RECURSION = YES; 1113 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1114 | COPY_PHASE_STRIP = NO; 1115 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1116 | GCC_NO_COMMON_BLOCKS = YES; 1117 | INFOPLIST_FILE = "reactNativeMap-tvOS/Info.plist"; 1118 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1119 | OTHER_LDFLAGS = ( 1120 | "-ObjC", 1121 | "-lc++", 1122 | ); 1123 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.reactNativeMap-tvOS"; 1124 | PRODUCT_NAME = "$(TARGET_NAME)"; 1125 | SDKROOT = appletvos; 1126 | TARGETED_DEVICE_FAMILY = 3; 1127 | TVOS_DEPLOYMENT_TARGET = 9.2; 1128 | LIBRARY_SEARCH_PATHS = ( 1129 | "$(inherited)", 1130 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1131 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1132 | ); 1133 | HEADER_SEARCH_PATHS = ( 1134 | "$(inherited)", 1135 | "$(SRCROOT)\..\node_modules\react-native-baidu-map\ios\RCTBaiduMap/**", 1136 | "$(SRCROOT)\..\node_modules\react-native-wechat\ios", 1137 | ); 1138 | }; 1139 | name = Release; 1140 | }; 1141 | 2D02E4991E0B4A5E006451C7 /* Debug */ = { 1142 | isa = XCBuildConfiguration; 1143 | buildSettings = { 1144 | BUNDLE_LOADER = "$(TEST_HOST)"; 1145 | CLANG_ANALYZER_NONNULL = YES; 1146 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1147 | CLANG_WARN_INFINITE_RECURSION = YES; 1148 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1149 | DEBUG_INFORMATION_FORMAT = dwarf; 1150 | ENABLE_TESTABILITY = YES; 1151 | GCC_NO_COMMON_BLOCKS = YES; 1152 | INFOPLIST_FILE = "reactNativeMap-tvOSTests/Info.plist"; 1153 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1154 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.reactNativeMap-tvOSTests"; 1155 | PRODUCT_NAME = "$(TARGET_NAME)"; 1156 | SDKROOT = appletvos; 1157 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reactNativeMap-tvOS.app/reactNativeMap-tvOS"; 1158 | TVOS_DEPLOYMENT_TARGET = 10.1; 1159 | LIBRARY_SEARCH_PATHS = ( 1160 | "$(inherited)", 1161 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1162 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1163 | ); 1164 | }; 1165 | name = Debug; 1166 | }; 1167 | 2D02E49A1E0B4A5E006451C7 /* Release */ = { 1168 | isa = XCBuildConfiguration; 1169 | buildSettings = { 1170 | BUNDLE_LOADER = "$(TEST_HOST)"; 1171 | CLANG_ANALYZER_NONNULL = YES; 1172 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1173 | CLANG_WARN_INFINITE_RECURSION = YES; 1174 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1175 | COPY_PHASE_STRIP = NO; 1176 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1177 | GCC_NO_COMMON_BLOCKS = YES; 1178 | INFOPLIST_FILE = "reactNativeMap-tvOSTests/Info.plist"; 1179 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1180 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.reactNativeMap-tvOSTests"; 1181 | PRODUCT_NAME = "$(TARGET_NAME)"; 1182 | SDKROOT = appletvos; 1183 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reactNativeMap-tvOS.app/reactNativeMap-tvOS"; 1184 | TVOS_DEPLOYMENT_TARGET = 10.1; 1185 | LIBRARY_SEARCH_PATHS = ( 1186 | "$(inherited)", 1187 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1188 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1189 | ); 1190 | }; 1191 | name = Release; 1192 | }; 1193 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 1194 | isa = XCBuildConfiguration; 1195 | buildSettings = { 1196 | ALWAYS_SEARCH_USER_PATHS = NO; 1197 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1198 | CLANG_CXX_LIBRARY = "libc++"; 1199 | CLANG_ENABLE_MODULES = YES; 1200 | CLANG_ENABLE_OBJC_ARC = YES; 1201 | CLANG_WARN_BOOL_CONVERSION = YES; 1202 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1203 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1204 | CLANG_WARN_EMPTY_BODY = YES; 1205 | CLANG_WARN_ENUM_CONVERSION = YES; 1206 | CLANG_WARN_INT_CONVERSION = YES; 1207 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1208 | CLANG_WARN_UNREACHABLE_CODE = YES; 1209 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1210 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1211 | COPY_PHASE_STRIP = NO; 1212 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1213 | GCC_C_LANGUAGE_STANDARD = gnu99; 1214 | GCC_DYNAMIC_NO_PIC = NO; 1215 | GCC_OPTIMIZATION_LEVEL = 0; 1216 | GCC_PREPROCESSOR_DEFINITIONS = ( 1217 | "DEBUG=1", 1218 | "$(inherited)", 1219 | ); 1220 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 1221 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1222 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1223 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1224 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1225 | GCC_WARN_UNUSED_FUNCTION = YES; 1226 | GCC_WARN_UNUSED_VARIABLE = YES; 1227 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1228 | MTL_ENABLE_DEBUG_INFO = YES; 1229 | ONLY_ACTIVE_ARCH = YES; 1230 | SDKROOT = iphoneos; 1231 | }; 1232 | name = Debug; 1233 | }; 1234 | 83CBBA211A601CBA00E9B192 /* Release */ = { 1235 | isa = XCBuildConfiguration; 1236 | buildSettings = { 1237 | ALWAYS_SEARCH_USER_PATHS = NO; 1238 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1239 | CLANG_CXX_LIBRARY = "libc++"; 1240 | CLANG_ENABLE_MODULES = YES; 1241 | CLANG_ENABLE_OBJC_ARC = YES; 1242 | CLANG_WARN_BOOL_CONVERSION = YES; 1243 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1244 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1245 | CLANG_WARN_EMPTY_BODY = YES; 1246 | CLANG_WARN_ENUM_CONVERSION = YES; 1247 | CLANG_WARN_INT_CONVERSION = YES; 1248 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1249 | CLANG_WARN_UNREACHABLE_CODE = YES; 1250 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1251 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1252 | COPY_PHASE_STRIP = YES; 1253 | ENABLE_NS_ASSERTIONS = NO; 1254 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1255 | GCC_C_LANGUAGE_STANDARD = gnu99; 1256 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1257 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1258 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1259 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1260 | GCC_WARN_UNUSED_FUNCTION = YES; 1261 | GCC_WARN_UNUSED_VARIABLE = YES; 1262 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1263 | MTL_ENABLE_DEBUG_INFO = NO; 1264 | SDKROOT = iphoneos; 1265 | VALIDATE_PRODUCT = YES; 1266 | }; 1267 | name = Release; 1268 | }; 1269 | /* End XCBuildConfiguration section */ 1270 | 1271 | /* Begin XCConfigurationList section */ 1272 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "reactNativeMapTests" */ = { 1273 | isa = XCConfigurationList; 1274 | buildConfigurations = ( 1275 | 00E356F61AD99517003FC87E /* Debug */, 1276 | 00E356F71AD99517003FC87E /* Release */, 1277 | ); 1278 | defaultConfigurationIsVisible = 0; 1279 | defaultConfigurationName = Release; 1280 | }; 1281 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "reactNativeMap" */ = { 1282 | isa = XCConfigurationList; 1283 | buildConfigurations = ( 1284 | 13B07F941A680F5B00A75B9A /* Debug */, 1285 | 13B07F951A680F5B00A75B9A /* Release */, 1286 | ); 1287 | defaultConfigurationIsVisible = 0; 1288 | defaultConfigurationName = Release; 1289 | }; 1290 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "reactNativeMap-tvOS" */ = { 1291 | isa = XCConfigurationList; 1292 | buildConfigurations = ( 1293 | 2D02E4971E0B4A5E006451C7 /* Debug */, 1294 | 2D02E4981E0B4A5E006451C7 /* Release */, 1295 | ); 1296 | defaultConfigurationIsVisible = 0; 1297 | defaultConfigurationName = Release; 1298 | }; 1299 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "reactNativeMap-tvOSTests" */ = { 1300 | isa = XCConfigurationList; 1301 | buildConfigurations = ( 1302 | 2D02E4991E0B4A5E006451C7 /* Debug */, 1303 | 2D02E49A1E0B4A5E006451C7 /* Release */, 1304 | ); 1305 | defaultConfigurationIsVisible = 0; 1306 | defaultConfigurationName = Release; 1307 | }; 1308 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "reactNativeMap" */ = { 1309 | isa = XCConfigurationList; 1310 | buildConfigurations = ( 1311 | 83CBBA201A601CBA00E9B192 /* Debug */, 1312 | 83CBBA211A601CBA00E9B192 /* Release */, 1313 | ); 1314 | defaultConfigurationIsVisible = 0; 1315 | defaultConfigurationName = Release; 1316 | }; 1317 | /* End XCConfigurationList section */ 1318 | }; 1319 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 1320 | } 1321 | -------------------------------------------------------------------------------- /ios/reactNativeMap.xcodeproj/xcshareddata/xcschemes/reactNativeMap-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /ios/reactNativeMap.xcodeproj/xcshareddata/xcschemes/reactNativeMap.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /ios/reactNativeMap/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/reactNativeMap/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | 21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; 22 | 23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 24 | moduleName:@"reactNativeMap" 25 | initialProperties:nil 26 | launchOptions:launchOptions]; 27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 28 | 29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 30 | UIViewController *rootViewController = [UIViewController new]; 31 | rootViewController.view = rootView; 32 | self.window.rootViewController = rootViewController; 33 | [self.window makeKeyAndVisible]; 34 | return YES; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ios/reactNativeMap/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ios/reactNativeMap/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ios/reactNativeMap/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | reactNativeMap 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UIViewControllerBasedStatusBarAppearance 40 | 41 | NSLocationWhenInUseUsageDescription 42 | 43 | NSAppTransportSecurity 44 | 45 | 46 | NSExceptionDomains 47 | 48 | localhost 49 | 50 | NSExceptionAllowsInsecureHTTPLoads 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /ios/reactNativeMap/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/reactNativeMapTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/reactNativeMapTests/reactNativeMapTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import 14 | #import 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface reactNativeMapTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation reactNativeMapTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "allowSyntheticDefaultImports": true 5 | }, 6 | "exclude": [ 7 | "node_modules" 8 | ] 9 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reactNativeMap", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node node_modules/react-native/local-cli/cli.js start", 7 | "test": "jest" 8 | }, 9 | "dependencies": { 10 | "react": "16.0.0-alpha.6", 11 | "react-native": "0.43.3", 12 | "react-native-wechat": "^1.9.2", 13 | "react-navigation": "^1.0.0-beta.7" 14 | }, 15 | "devDependencies": { 16 | "babel-jest": "19.0.0", 17 | "babel-preset-react-native": "1.9.1", 18 | "jest": "19.0.2", 19 | "react-test-renderer": "16.0.0-alpha.6" 20 | }, 21 | "jest": { 22 | "preset": "react-native" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /server/fetchOperators.api.js: -------------------------------------------------------------------------------- 1 | //网络请求工具文件。 2 | import serverConfig from './server.config'; 3 | /** 4 | * 5 | * @param router 路径 6 | * @param method 请求方法 7 | * @param data 请求body 8 | * @returns {Promise.<*>} 9 | */ 10 | export default async (router, method, data) => { 11 | if(!router){ 12 | console.warn('路径不能为空!'); 13 | return; 14 | } 15 | if(!method){ 16 | console.warn('请求方法不能为空!'); 17 | return; 18 | } 19 | try { 20 | let responed = await fetch(serverConfig.gateway+router, { 21 | method, 22 | headers: { 23 | "Content-Type": "Application/json" 24 | }, 25 | body: JSON.stringify(data) 26 | }); 27 | let json = await responed.json(); 28 | return json; 29 | } catch (error) { 30 | console.warn(error); 31 | } 32 | }; -------------------------------------------------------------------------------- /server/server.config.js: -------------------------------------------------------------------------------- 1 | //服务器地址,端口设置 2 | export default { 3 | gateway: 'http://139.129.12.5:3000' 4 | } -------------------------------------------------------------------------------- /view/BaiduMap.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 地图页面,记录运动路径,和操作控制 3 | */ 4 | import React, { 5 | Component 6 | } from 'react'; 7 | import { 8 | View, 9 | Text, 10 | StyleSheet, 11 | TouchableOpacity, 12 | ToastAndroid 13 | } from 'react-native'; 14 | 15 | import BaiduMap from '../AndroidView/BaiduMap'; 16 | import Geolocation from '../AndroidView/Geolocation'; 17 | import * as WeChat from 'react-native-wechat'; 18 | import Dimensions from 'Dimensions'; 19 | //设备的宽高 20 | const { 21 | height, 22 | width 23 | } = Dimensions.get('window'); 24 | 25 | class BaiduMapView extends Component { 26 | //设置初始化状态 27 | constructor(props) { 28 | super(props); 29 | this.state = { 30 | init: false, 31 | time: null, 32 | //中心点 33 | center: { 34 | latitude: 30.5420481175, 35 | longitude: 114.3193136847 36 | }, 37 | //缩放比列 38 | zoom: 20, 39 | currentLoc: { 40 | latitude: 30.5420481175, 41 | longitude: 114.3193136847, 42 | title: '起点', 43 | startOrEnd: true 44 | }, 45 | //开始时间 46 | startServiceTime: (new Date()).getTime(), 47 | endServiceTime: (new Date()).getTime(), 48 | //鹰眼服务开始或者停止 49 | // -1 为 未开启 50 | // 0 为 开启服务 51 | // 1 为 停止服务 52 | startOrStopTrace: -1, 53 | //开始绘制地图 54 | dreaTrackStartTime: { 55 | //是否开始绘制 56 | start: false, 57 | //鹰眼服务开始时间 58 | startTime: this.startServiceTime 59 | }, 60 | //清除所有标记 61 | clearMarkers: false, 62 | markers: [{ 63 | latitude: 30.5420481175, 64 | longitude: 114.3193136847, 65 | title: '起点', 66 | startOrEnd: true 67 | }], 68 | //开始按钮 69 | //0 显示:开跑 70 | //1 显示:重新开始 71 | startBtn: 0, 72 | //结束按钮 73 | //0 显示: 结束 74 | //1 显示: 分享 75 | endBtn: 0 76 | } 77 | } 78 | 79 | //注册微信插件,和去的当前位置 80 | componentDidMount() { 81 | WeChat.registerApp('微信key'); 82 | //获取当前位置 83 | this._setLocation(); 84 | } 85 | 86 | //当组件将要卸载的时候,去除,时间循环器 87 | componentWillUnmount() { 88 | clearInterval(this.state.time); 89 | } 90 | 91 | //设置定时器 92 | _setLocation() { 93 | this._getCurrentPosition(); 94 | this.state.time = setInterval(() => { 95 | this._getCurrentPosition(); 96 | }, 2000); 97 | } 98 | 99 | //获取当前位置 100 | async _getCurrentPosition() { 101 | try { 102 | var { 103 | latitude, 104 | longitude 105 | } = await Geolocation.getCurrentPosition(); 106 | // console.warn(latitude, longitude); 107 | if (!this.state.init) { 108 | this.setState({ 109 | init: true, 110 | center: { 111 | latitude, 112 | longitude 113 | }, 114 | markers: [{ 115 | latitude, 116 | longitude, 117 | title: '起点', 118 | startOrEnd: true 119 | }] 120 | }); 121 | return; 122 | } 123 | 124 | this.setState({ 125 | markers: [{ 126 | latitude, 127 | longitude, 128 | title: '起点', 129 | startOrEnd: true 130 | }] 131 | }); 132 | 133 | } catch (error) { 134 | console.warn(error, 'error'); 135 | } 136 | } 137 | 138 | //重新加载组件 139 | _reload() { 140 | this.setState({ 141 | init: false, 142 | //中心点 143 | center: { 144 | latitude: 30.5420481175, 145 | longitude: 114.3193136847 146 | }, 147 | //缩放比列 148 | zoom: 20, 149 | currentLoc: { 150 | latitude: 30.5420481175, 151 | longitude: 114.3193136847, 152 | title: '起点', 153 | startOrEnd: true 154 | }, 155 | startServiceTime: (new Date()).getTime(), 156 | startOrStopTrace: -1, 157 | dreaTrackStartTime: { 158 | start: false, 159 | startTime: this.startServiceTime 160 | }, 161 | markers: [{ 162 | latitude: 30.5420481175, 163 | longitude: 114.3193136847, 164 | title: '起点', 165 | startOrEnd: true 166 | }], 167 | clearMarkers: true, 168 | startBtn: 0, 169 | endBtn: 0 170 | }); 171 | this._setLocation(); 172 | } 173 | //开始按钮的动作。 174 | _handleStartPress() { 175 | if (this.state.startBtn === 0) { 176 | ToastAndroid.showWithGravity('路程开始记录!', ToastAndroid.LONG, ToastAndroid.CENTER); 177 | this.setState({ 178 | startOrStopTrace: 0, 179 | startServiceTime: (new Date()).getTime(), 180 | startBtn: 1 181 | }); 182 | } else if (this.state.startBtn === 1) { 183 | //重载当前页面 184 | this._reload(); 185 | } 186 | 187 | } 188 | //接受按钮的操作 189 | _handleEndPress() { 190 | let { 191 | navigate 192 | } = this.props.navigation; 193 | if (this.state.startBtn === 0) { 194 | ToastAndroid.showWithGravity('请先点击开始按钮!', ToastAndroid.LONG, ToastAndroid.CENTER); 195 | return; 196 | } 197 | //打开另一个页面 198 | if (this.state.endBtn === 1) { 199 | let time = this.state.endServiceTime - this.state.startServiceTime; 200 | navigate('TrackShowShare', { 201 | historyTracks: this.state.historyTracks, 202 | time 203 | }); 204 | return; 205 | } 206 | this.setState({ 207 | dreaTrackStartTime: { 208 | start: true, 209 | startTime: this.state.startServiceTime 210 | }, 211 | //停止鹰眼服务 212 | startOrStopTrace: 1, 213 | }); 214 | this.state.endServiceTime = (new Date()).getTime(); 215 | //清除定时器 216 | clearInterval(this.state.time); 217 | } 218 | 219 | //画轨迹 220 | _sendHistoryTrack(e) { 221 | if (e.status == 0) { 222 | let str2json = JSON.parse(e.TrackPoints); 223 | e.TrackPoints = str2json; 224 | //跳转到另一个页面 225 | //展现页面 226 | this.setState({ 227 | historyTracks: e, 228 | endBtn: 1, 229 | start: 1 230 | }) 231 | console.log(JSON.stringify(e)); 232 | } else { 233 | ToastAndroid.showWithGravity('路程太短,无法捕获,请重新开始。', ToastAndroid.LONG, ToastAndroid.CENTER); 234 | } 235 | } 236 | render() { 237 | let { 238 | state 239 | } = this; 240 | return ( 241 | 242 | 255 | 256 | 257 | 260 | {state.startBtn === 0 ? '开跑' : '重新开始'} 261 | 262 | 263 | 266 | {state.endBtn === 0 ? '结束' : '分享'} 267 | 268 | 269 | 270 | ); 271 | } 272 | } 273 | 274 | const styles = StyleSheet.create({ 275 | container: { 276 | flex: 1, 277 | position: 'relative' 278 | }, 279 | btnArea: { 280 | flexDirection: 'row', 281 | width: width, 282 | height: height * 0.16, 283 | position: 'absolute', 284 | bottom: 0, 285 | justifyContent: 'space-around', 286 | alignItems: 'center', 287 | padding: 5 288 | }, 289 | button: { 290 | width: 100, 291 | height: 100, 292 | borderRadius: 50, 293 | backgroundColor: 'red', 294 | alignItems: 'center', 295 | justifyContent: 'center' 296 | }, 297 | buttonText: { 298 | fontSize: 20, 299 | color: 'white' 300 | } 301 | }); 302 | 303 | export default BaiduMapView; -------------------------------------------------------------------------------- /view/Details.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 详情页,使用地图显示轨迹。 3 | */ 4 | import React, {Component} from 'react'; 5 | import { 6 | View, 7 | Text, 8 | StyleSheet, 9 | TouchableOpacity, 10 | ToastAndroid 11 | } from 'react-native'; 12 | import BaiduMap from '../AndroidView/BaiduMap'; 13 | import Geolocation from '../AndroidView/Geolocation'; 14 | import Dimensions from 'Dimensions'; 15 | import ulits from './utils'; 16 | import * as WeChat from 'react-native-wechat'; 17 | import fetchOperator from '../server/fetchOperators.api'; 18 | //设备的宽高 19 | const {height, width} = Dimensions.get('window'); 20 | 21 | export default class Details extends Component { 22 | constructor(props){ 23 | super(props); 24 | } 25 | 26 | async _shareWX() { 27 | // 分享网页 28 | try { 29 | let result = await WeChat.shareToTimeline({ 30 | type: 'text', 31 | description: `小伙伴们,我跑了${this.props.navigation.state.params.historyTracks.distance.toFixed(2)}米,用时${ulits.second2hms(this.props.navigation.state.params.time)}大家都来吧#Running#` 32 | }); 33 | console.log('share text message to time line successful:', result); 34 | } catch (e) { 35 | console.error('share text message to time line failed with:', e); 36 | } 37 | } 38 | 39 | componentDidMount(){ 40 | WeChat.registerApp('wx6575737601f069e8'); 41 | } 42 | 43 | //删除数据 44 | _deleteData(){ 45 | (async () => { 46 | let {historyTracks,getData} = this.props.navigation.state.params; 47 | let {goBack} = this.props.navigation; 48 | let data = await fetchOperator('/removeMapRecord', 'POST', {"_id": historyTracks._id}); 49 | if(data.status === 0){ 50 | ToastAndroid.showWithGravity('删除成功!', ToastAndroid.LONG, ToastAndroid.CENTER); 51 | setTimeout(()=>{ 52 | getData(); 53 | goBack(); 54 | }, ToastAndroid.LONG); 55 | } 56 | })(); 57 | } 58 | 59 | render() { 60 | let {navigate, state} = this.props.navigation; 61 | let {historyTracks} = state.params; 62 | return ( 63 | 64 | 73 | 74 | {historyTracks.distance.toFixed(2)} 75 | {ulits.second2hms(historyTracks.time)} 76 | 77 | 78 | {/* {}}> 81 | {'QQ'} 82 | */} 83 | 86 | {'微信'} 87 | 88 | 91 | {'删除'} 92 | 93 | 94 | 95 | ); 96 | } 97 | } 98 | 99 | const styles = StyleSheet.create({ 100 | container: { 101 | flex: 1 102 | }, 103 | map: { 104 | height: height * 0.55, 105 | width: width, 106 | }, 107 | textContent: { 108 | height: height*0.15, 109 | width: width, 110 | flexDirection: 'column', 111 | justifyContent: 'center', 112 | alignItems: 'center', 113 | marginTop: 5, 114 | marginBottom: 5, 115 | }, 116 | btns: { 117 | flex: 1, 118 | flexDirection: 'row', 119 | justifyContent: 'space-around', 120 | alignItems: 'center', 121 | }, 122 | button: { 123 | width: 100, 124 | height: 100, 125 | borderRadius : 50, 126 | backgroundColor: 'red', 127 | alignItems: 'center', 128 | justifyContent: 'center' 129 | }, 130 | }); -------------------------------------------------------------------------------- /view/HomePage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 测试页面,避免百度地图在模拟器上直接崩溃,地图只有在真机上运行才可以获取完整权限,地图才能正常加载 3 | */ 4 | import React, { Component } from 'react'; 5 | import { 6 | StyleSheet, 7 | Text, 8 | View, 9 | Image, 10 | TouchableOpacity, 11 | Alert 12 | } from 'react-native'; 13 | import Geolocation from '../AndroidView/Geolocation'; 14 | import TraceService from '../AndroidView/TraceService'; 15 | import Dimensions from 'Dimensions'; 16 | //设备的宽高 17 | const {height, width} = Dimensions.get('window'); 18 | 19 | 20 | class HomePage extends Component { 21 | static navigationOptions = { 22 | title: '开始' 23 | }; 24 | 25 | constructor(props){ 26 | super(props); 27 | this.state = { 28 | startDate: '', 29 | startStatus: 'start' 30 | } 31 | } 32 | 33 | componentDidMount() { 34 | //获取当前位置 35 | 36 | } 37 | 38 | shouldComponentUpdate(nextProps, nextState){ 39 | if(nextProps === this.props && nextState === this.state){ 40 | return false; 41 | }else{ 42 | return true; 43 | } 44 | } 45 | 46 | render() { 47 | let {state} = this; 48 | return ( 49 | 50 | 51 | { 54 | let startStatus = state.startStatus === 'start' ? 'end' : 'start'; 55 | this.setState({ 56 | startStatus 57 | }); 58 | }}> 59 | {state.startStatus} 60 | 61 | {}}> 64 | end 65 | 66 | 67 | 68 | ); 69 | } 70 | } 71 | 72 | 73 | const styles = StyleSheet.create({ 74 | icon: { 75 | width: 32, 76 | height: 32 77 | }, 78 | container: { 79 | flex: 1, 80 | backgroundColor: 'yellow', 81 | position : 'relative' 82 | }, 83 | btnArea: { 84 | flexDirection: 'row', 85 | width: width, 86 | height: height * 0.16, 87 | position: 'absolute', 88 | bottom: 0, 89 | justifyContent: 'space-around', 90 | alignItems: 'center', 91 | padding: 5 92 | }, 93 | button: { 94 | width: 100, 95 | height: 100, 96 | borderRadius : 50, 97 | backgroundColor: 'red', 98 | alignItems: 'center', 99 | justifyContent: 'center' 100 | } 101 | }); 102 | 103 | 104 | export default HomePage -------------------------------------------------------------------------------- /view/MainPage.navi.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 地图页面的导航器设置,包含地图,分享页 3 | */ 4 | import React, { Component } from 'react'; 5 | import { 6 | StyleSheet, 7 | Text, 8 | View, 9 | ScrollView, 10 | Image 11 | } from 'react-native'; 12 | import {StackNavigator} from 'react-navigation'; 13 | 14 | import BaiduMap from './BaiduMap'; 15 | import TrackShowShare from './TrackShowShare'; 16 | 17 | const MainPage = StackNavigator({ 18 | BaiduMap: { 19 | screen: BaiduMap, 20 | navigationOptions: { 21 | title: '地图', 22 | } 23 | 24 | }, 25 | TrackShowShare: { 26 | screen: TrackShowShare 27 | } 28 | },{ 29 | initialRouteName: 'BaiduMap', 30 | mode: 'card', 31 | headerMode: 'screen', 32 | headerVisible: false, 33 | headerTitle: '地图', 34 | headerStyle: { 35 | backGroundColor: 'red' 36 | } 37 | }); 38 | 39 | export default MainPage; -------------------------------------------------------------------------------- /view/RecordList.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 列表页面,显示记录,可以查看详情 3 | */ 4 | import React, { Component } from 'react'; 5 | import { 6 | StyleSheet, 7 | Text, 8 | View, 9 | ListView, 10 | TouchableOpacity, 11 | Button, 12 | ToastAndroid, 13 | RefreshControl 14 | } from 'react-native'; 15 | import {StackNavigator} from 'react-navigation'; 16 | import Details from './Details'; 17 | import TrackShowShare from './TrackShowShare'; 18 | import fo from '../server/fetchOperators.api'; 19 | import fetchOperators from '../server/fetchOperators.api'; 20 | import utils from './utils'; 21 | 22 | class RecordList extends Component { 23 | 24 | //情况按钮,为导航器的静态方法,执行改变了组件的props,组件会重新渲染,使用shouldComponentUpdate判断是否需要重新渲染 25 | static async _emptyData(setParams){ 26 | //请求服务器的api 27 | let data = await fetchOperators('/removeAllMapRecords', 'POST'); 28 | if(data.status === 0){ 29 | ToastAndroid.showWithGravity('删除成功!', ToastAndroid.LONG, ToastAndroid.CENTER); 30 | setParams({reload: true}); 31 | } 32 | } 33 | 34 | //设置清空按钮 35 | static navigationOptions = { 36 | header: ({state, setParams}) => { 37 | let right = ( 38 | 39 |