-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
46 lines (42 loc) · 1.07 KB
/
App.tsx
1
2
3
4
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
35
36
37
38
39
40
41
42
43
44
45
46
import React from 'react';
import {Button, SafeAreaView, StyleSheet, View} from 'react-native';
import {showLocation} from 'react-native-map-link';
const App = () => {
return (
<SafeAreaView>
<View style={styles.buttonWrap}>
<Button
title="Open TruckMap (place)"
onPress={() =>
showLocation({
latitude: 38.8976763,
longitude: -77.0387185,
appsWhiteList: ['truckmap', 'google-maps'],
})
}
/>
<Button
title="Open TruckMap (route)"
onPress={() =>
showLocation({
sourceLatitude: 38.8971833,
sourceLongitude: -77.0388289,
latitude: 38.8976763,
longitude: -77.0387185,
appsWhiteList: ['truckmap', 'google-maps'],
})
}
/>
</View>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
buttonWrap: {
width: '100%',
height: '100%',
alignItems: 'center',
justifyContent: 'center',
},
});
export default App;