Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김대연
/
emergency_room_ChatBot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
AzureAD\김대연
2022-11-29 16:37:21 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
2d2999b30b7d97c7cdd30f76f44f425f6ef023c3
2d2999b3
2 parents
ab4ba6a1
beee194a
Merge branch 'Daeyeon'
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
Address.js
Address.js
View file @
2d2999b
...
...
@@ -6,22 +6,30 @@ globalThis.fetch = fetch.fetch;
var
AddressList
=
new
Array
();
function
getAddress
(
currQuery
)
{
function
getAddress
(
currQuery
,
cb
=
()
=>
{})
{
setTimeout
(
function
()
{
fetch
(
'https://dapi.kakao.com/v2/local/search/address.json?'
+
new
URLSearchParams
({
query
:
currQuery
}),
{
method
:
"GET"
,
headers
:
{
"Authorization"
:
"KakaoAK c14234ba46c574c73715276c5644f397"
}
headers
:
{
"Authorization"
:
"KakaoAK c14234ba46c574c73715276c5644f397"
}
})
.
then
(
response
=>
response
.
json
())
.
then
(
data
=>
{
console
.
log
(
response
)
AddressList
=
data
.
documents
.
map
(({
road_address
})
=>
({
road_address
}));
console
.
log
(
AddressList
)
return
AddressList
})
//console.log(response)
AddressList
=
data
.
documents
.
map
(({
road_address
})
=>
({
road_address
}));
//console.log(AddressList)
cb
(
AddressList
);
});
},
100
)
}
/*
getAddress('석수동길', function (address) {
console.log(address[0].road_address.address_name);
})
*/
...
...
Please
register
or
login
to post a comment