JHLeeeMe / JHLeeeMe.github.io-comments

utterances를 이용한 blog 댓글 앱 저장소
https://JHLeeeMe.github.io
0 stars 0 forks source link

google-maps-api-uses/ #8

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Google Maps API를 활용한 주소데이터 스크래핑 | 내가 다시 보려고 만든 블로그

지도 정보를 얻을 수 있는 Google Maps위치에 대한 검색 결과 중 주소와 위도, 경도 정보를 제공하는 APIAPI 설정 순서 Google Maps API 주소: https://cloud.google.com/maps-platform/ 시작하기 버튼을 누르...

https://jhleeeme.github.io/google-maps-api-uses/

joanna22jkr commented 2 years ago

안녕하세요? 장소명 기준으로 place_id와 위경도 정보 필요해서 위 자료 정말 잘 참조하였습니다. 감사합니다.

추가 문의가 있어 글 남깁니다 혹시 address_components에서 short_name을 가져오려고 하는데 {'long_name': '대한민국', 'short_name': 'KR', 'types': ['country', 'political']},

국가코드를 가져올때 place(장소)마다 [3]...[6]번째 위치가 달라서 획일적으로 적용이 안되는 거 같습니다.

<제가 작성한 부분> cntrr_cd = tmp[0].get('address_components')[5]['short_name'])

types가 country인 경우의 short_name을 가져오도록 코딩이 가능할까요?