FindPath.js 1.14 KB
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',
    }
});