react-native-launch-kakao-navi
v1.0.4
Published
리액트 네이티브용 카카오내비입니다.
Downloads
10
Readme
react-native-launch-kakao-navi
Getting started
$ npm install react-native-launch-kakao-navi --save
Mostly automatic installation
$ react-native link react-native-launch-kakao-navi
Usage
안드로이드 : AndroidManifest.xml
<meta-data android:name="com.kakao.sdk.AppKey" android:value="@string/kakao_app_key" />
IOS : info.plist
<key>KAKAO_APP_KEY</key>
<string>키값</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>kakaonavi-sdk</string>
</array>
```javascript
import LaunchKakaoNavi from 'react-native-launch-kakao-navi';
let arrData = { destName : "서울특별시 광진구 광장동 248-2", destX : 127.103432, destY: 37.546394};
let arrOptions = {
coordType : "WGS84",
vehicleType : 2,
rpOption : 1,
routeInfo : false,
//startX: data.startX,
//startY: data.startY,
//startAngle: 0,
userId : "admin",
returnUri : "localhost"
};
let arrVias = null;
LaunchKakaoNavi.navigate(arrData.destName, arrData.destY, arrData.destX, arrOptions, arrVias).then(async(res) => {
if(res == "03")
{
alert("경로를 탑색할수 없습니다. 좌표를 확인하여 주십시오.");
}
}
)
.catch(e => {
alert("내비에 오류가 있어 사용할수 없습니다. 잠시후 다시 시도하여 주십시오.");
console.log(e.message, e.code)
});