티스토리 뷰

API/Google 구글

구글 지도 쓰기

KIMSG 2017. 7. 21. 15:48
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<style>
                        html, body {
                          height: 100%;
                          margin: 0;
                          padding: 0;
                        }
                        #map {
                          height: 100%;
                        }
                    </style>
                        <tr>
                              <td style="height: 300px;">
                                    <div id="map"></div>
                              </td>
                        </tr>
 
cs



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<script src="https://maps.googleapis.com/maps/api/js?key=키키키키&callback=initMap" async defer></script>
 
 
 
 
function initMap() {
      map = new google.maps.Map(document.getElementById('map'), {
          center: {lat: 37.5509008, lng: 127.1406541},
          zoom: 17
      });
      
      marker = new google.maps.Marker({
          position: {lat: 37.5509008, lng: 127.1406541},
          map: map,
            draggable: true,
            //animation: google.maps.Animation.DROP,                    //핀이 날아온다. 
            title: '우리집'
      });
      //marker.addListener('click', toggleBounce);                 // 클릭하면 통통 튄다.2
      
}
 
cs


'API > Google 구글' 카테고리의 다른 글

언어 바꾸기  (0) 2017.07.21
구글 지도 마커 드래그 마지막값 가져오기  (0) 2017.07.21
프로필 띄우기...  (0) 2017.07.21
구글 플러스에 공유 시켜보기... (google plus)  (0) 2017.07.21
구글 로그인 사용법  (0) 2017.07.21
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함