구글 지도 API 에서요...

구글 지도 API 를 공부하고 있는 왕초보 입니다. ^^

구글에서는 튜토리얼 예제를 제공하고 있는데요.

아래는 지도 가운데 마커를 하고 설명으로..Hello World! 를 보여주는 예제 입니다.

그런데.. 다른 주변에 마커 하나를 더 찍으려면 어떻게 해야하는지요 ? ㅠㅠ

고수님들의 답변을 바랍니다. ㅠㅠ





<!DOCTYPE html>
<html DIR="LTR">
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"  /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Google Maps JavaScript API v3 예제: 간단한 이벤트</title>
<link href="/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
 var map;
 function initialize() {
   var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
   var myOptions = {
     zoom: 4,
     center: myLatlng,
     mapTypeId: google.maps.MapTypeId.ROADMAP
   }
   map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

   google.maps.event.addListener(map, 'zoom_changed', function() {
     setTimeout(moveToDarwin, 1500);
   });

   var marker = new google.maps.Marker({
       position: myLatlng,
       map: map,
       title:"Hello World!"
   });
   google.maps.event.addListener(marker, 'click', function() {
     map.setZoom(8);
   });
 }

 function moveToDarwin() {
   var darwin = new google.maps.LatLng(-12.461334, 130.841904);
   map.setCenter(darwin);
 }

</script>
</head>
<body onload="initialize()">
 <div id="map_canvas"></div>
</body>
</html>
|

댓글 1개

var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"Hello World!"
});
윗 부분을 한번더 써주시면 됩니다.
//표시할 위치
var myLatlng2 = new google.maps.LatLng(표시할 위치 좌표값,표시할 위치 좌표값);
//마커생성
var marker2 = new google.maps.Marker({
position: myLatlng2,
map: map,
title:"따이뜰!"
});
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
13년 전 조회 1,414
13년 전 조회 2,634
13년 전 조회 1,362
13년 전 조회 1,712
13년 전 조회 2,391
13년 전 조회 1,728
13년 전 조회 1,379
13년 전 조회 2,105
13년 전 조회 4,376
13년 전 조회 1,110
13년 전 조회 1,175
13년 전 조회 1,352
13년 전 조회 4,454
13년 전 조회 1,802
13년 전 조회 2,008
13년 전 조회 2,018
13년 전 조회 1,311
13년 전 조회 1,172
13년 전 조회 1,337
13년 전 조회 2,145
13년 전 조회 1,508
13년 전 조회 1,818
13년 전 조회 3,013
13년 전 조회 1,494
13년 전 조회 1,820
13년 전 조회 1,899
13년 전 조회 1,264
13년 전 조회 4,009
13년 전 조회 1,779
13년 전 조회 3,322
13년 전 조회 1,633
13년 전 조회 1,347
13년 전 조회 1,365
13년 전 조회 1,246
13년 전 조회 1,786
13년 전 조회 1,925
13년 전 조회 3,245
13년 전 조회 4,882
13년 전 조회 1,266
13년 전 조회 3,837
13년 전 조회 1,198
13년 전 조회 1,682
13년 전 조회 1,288
13년 전 조회 1,632
13년 전 조회 2,403
13년 전 조회 1,797
13년 전 조회 1,188
13년 전 조회 1,854
13년 전 조회 1,469
13년 전 조회 1,874
13년 전 조회 2,315
13년 전 조회 1,696
13년 전 조회 1,281
13년 전 조회 2,538
13년 전 조회 1,781
13년 전 조회 1,321
13년 전 조회 1,258
13년 전 조회 1,647
13년 전 조회 1,187
13년 전 조회 2,367
13년 전 조회 1,586
13년 전 조회 1,562
13년 전 조회 1,223
13년 전 조회 1,942
13년 전 조회 2,751
13년 전 조회 1,170
13년 전 조회 1,061
13년 전 조회 1,298
13년 전 조회 3,927
13년 전 조회 1,331
13년 전 조회 1,901
13년 전 조회 1,680
13년 전 조회 1,285
13년 전 조회 8,376
13년 전 조회 1,675
13년 전 조회 2,338
13년 전 조회 1,316
13년 전 조회 1,676
13년 전 조회 1,514
13년 전 조회 2,498
13년 전 조회 3,925
13년 전 조회 2,157
13년 전 조회 3,853
13년 전 조회 2,023
13년 전 조회 4,466
13년 전 조회 1,976
13년 전 조회 1,513
13년 전 조회 2,468
13년 전 조회 3,231
13년 전 조회 2,158
13년 전 조회 1,968
13년 전 조회 3,749
13년 전 조회 1,753
13년 전 조회 1,302
13년 전 조회 2,223
13년 전 조회 1,418
13년 전 조회 5,771
13년 전 조회 1,406
13년 전 조회 1,809
13년 전 조회 1,373