FindPath.js
1.14 KB
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
import React, { Component } from 'react';
import { View, Text, StyleSheet,TouchableOpacity,Image } from 'react-native';
import MapView from 'react-native-daummap';
import Postcode from '../Postcode'
export default class AddTab extends Component {
static navigationOptions = {
headerShown: false
}
state = {
mapLoading:false,
}
componentDidMount = () => {
MapView.serachAddress("양호동")
.then((responseJson) => {
// API 결과값 반환
console.log(responseJson);
}).catch((error) => {
// API 호출 중 오류 발생시
console.log(error);
});
}
render() {
return (
<View>
<View style={{width:"100%",height:"90%"}}>
<Postcode
jsOptions={{ animated: true }}
onSelected={(data) => alert(JSON.stringify(data))}
/>
</View>
</View>
);
}
}
const style = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
}
});