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
1
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
root
2022-11-29 09:08:44 +0000
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
27f9e8c73919463a24812e2030c69199fabcfbb9
27f9e8c7
2 parents
d5ed20ac
c4e55670
Merge branch 'main' into sihwan
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
Address.js
Address.js
View file @
27f9e8c
...
...
@@ -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