appinfo.getAddressDetail - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.appinfo.getAddressDetail

API μ„€λͺ…

  • μš°λ¦¬μ§‘ 상세 μ£Όμ†Œ 쑰회 API
  • GiGA Genie 에 μ„€μ •λœ μš°λ¦¬μ§‘ 상세 μ£Όμ†Œλ₯Ό μ‘°νšŒν•¨
  • μš°λ¦¬μ§‘ μ£Όμ†ŒλŠ” Companion App μ—μ„œ μ„€μ •ν•œ μ£Όμ†Œ μ •λ³΄μž„
  • userinfo κΆŒν•œμ΄ μžˆλŠ” appid 만 호좜 κ°€λŠ₯

API ꡬ쑰

  • function getAddressDetail(options,callback)
  • options
    • null
  • result_cd
    • 200: 성곡
    • 404: μ €μž₯된 μ£Όμ†Œκ°’ μ—†μŒ
    • 500: μ‹œμŠ€ν…œ Error
  • extra
    • address: (String) μš°λ¦¬μ§‘ μ£Όμ†Œλ‘œ μ„€μ •λœ μ£Όμ†Œ
    • subaddress: (String) 상세 μ£Όμ†Œμ΄λ©° 없을 경우 미전달
    • gpsX: (String) WGS84 경도 μ’Œν‘œ
    • gpsY: (String) WGS84 μœ„λ„ μ’Œν‘œ
    • posX: (String) GRS80(UTM-K) 경도 μ’Œν‘œ
    • posY: (String) GRS80(UTM-K) μœ„λ„ μ’Œν‘œ

μ‚¬μš© μ˜ˆμ‹œ

// callback 방식
gigagenie.appinfo.getAddress(null, function (result_cd, result_msg, extra) {
    if (result_cd === 200) {
        var address = extra.address;
        var subaddress = extra.subaddress;
        console.log("GiGA Genie Home Address = " + address + " " + subaddress);
        console.log("WGS84 X:" + extra.gpsX + " WGS84 Y:" + extra.gpsY);
        console.log("GRS80 X:" + extra.posX + " GRS80 Y:" + extra.posY);
    } else if (result_cd === 404) {
        var address = extra.address;
        console.log("Address is not found");
    } else {
        console.log("Getting Home Address fail.");
    }
});