Merge branch 'Yerim' into 'Yerim'
Directions_15_sample_3 See merge request !11
Showing
1 changed file
with
6 additions
and
2 deletions
1 | +const express= require('express'); | ||
2 | +const app = express(); | ||
1 | var request = require('request'); | 3 | var request = require('request'); |
2 | 4 | ||
3 | //필요한 주소 정보 (data 형식 확정 x ) | 5 | //필요한 주소 정보 (data 형식 확정 x ) |
... | @@ -6,11 +8,11 @@ let address = { | ... | @@ -6,11 +8,11 @@ let address = { |
6 | "number" : 10, | 8 | "number" : 10, |
7 | "hospital_data" :[ | 9 | "hospital_data" :[ |
8 | {"name" : "병원명", "address" : "병원 주소", "x" : 129.075986, "y" : 35.179470}, | 10 | {"name" : "병원명", "address" : "병원 주소", "x" : 129.075986, "y" : 35.179470}, |
9 | - {"name" : "병원명", "address" : "병원 주소", "x" : 127.1058342, "y" : 37.359708} | 11 | + {"name" : "병원명", "address" : "병원 주소", "x" : 127.1058342, "y" : 37.359708}, |
12 | + {"name" : "병원명", "address" : "병원 주소", "x" : 126.1058342, "y" : 37.359708} | ||
10 | ] | 13 | ] |
11 | } | 14 | } |
12 | 15 | ||
13 | - | ||
14 | var options = { | 16 | var options = { |
15 | 'method': 'GET', | 17 | 'method': 'GET', |
16 | 'url': 'https://naveropenapi.apigw.ntruss.com/map-direction-15/v1/driving?start='+address.current_address.x+',' | 18 | 'url': 'https://naveropenapi.apigw.ntruss.com/map-direction-15/v1/driving?start='+address.current_address.x+',' |
... | @@ -21,6 +23,8 @@ var options = { | ... | @@ -21,6 +23,8 @@ var options = { |
21 | } | 23 | } |
22 | }; | 24 | }; |
23 | 25 | ||
26 | + | ||
27 | + | ||
24 | request(options, function (error, response) { | 28 | request(options, function (error, response) { |
25 | if (error) throw new Error(error); | 29 | if (error) throw new Error(error); |
26 | let body = JSON.parse(response.body); | 30 | let body = JSON.parse(response.body); | ... | ... |
-
Please register or login to post a comment