https://console.cloud.google.com/google/maps-apis/start?hl=ko

[Google Cloud Platform

하나의 계정으로 모든 Google 서비스를 Google Cloud Platform을 사용하려면 로그인하세요.

accounts.google.com](https://console.cloud.google.com/google/maps-apis/start?hl=ko)

우선 해당 링크에 들어가서 로그인 및 다음 절차들을 완료해준다

구글 맵 api가 기본적으로는 유료지만 한달 200달러까지는 무료이며

api로 위치만 받아오는 행위는 1회에 0.007달러라서 사실상 공부목적으로 사용한다면 무료나 마찬가지이다

기본적인 코드

<div id="googleMap" style="width: 100%;height: 700px;"></div>

<script>
   function myMap(){
      var mapOptions = { 
            center:new google.maps.LatLng(위도, 경도),
            zoom:5
      };
 
      var map = new google.maps.Map( 
             document.getElementById("googleMap") 
            , mapOptions );
   }
</script> 
<script src="https://maps.googleapis.com/maps/api/js?key=API_KEY&callback=myMap"></script>

위도, 경도에다가 위도, 경도를 입력해준후에

API_KEY에 본인 key값을 입력해주면된다

zoom은 처음 떳을때의 확대정도인데 개인적으로 17정도가 적당해보인다

google map api 적용

[18일차 / google map api

google map api에 대해 내가 쓴 글 https://fullfish.tistory.com/111 구글 맵 API https://console.cloud.google.com/google/maps-apis/start?hl=ko Google Cloud Platform 하나의 계정으로 모든 Google 서비스를..

fullfish.tistory.com](https://fullfish.tistory.com/113?category=1053678)