구글 지도 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>
구글에서는 튜토리얼 예제를 제공하고 있는데요.
아래는 지도 가운데 마커를 하고 설명으로..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개
13년 전
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:"따이뜰!"
});
position: myLatlng,
map: map,
title:"Hello World!"
});
윗 부분을 한번더 써주시면 됩니다.
//표시할 위치
var myLatlng2 = new google.maps.LatLng(표시할 위치 좌표값,표시할 위치 좌표값);
//마커생성
var marker2 = new google.maps.Marker({
position: myLatlng2,
map: map,
title:"따이뜰!"
});
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7830 | 9년 전 | 380 | ||
| 7829 |
|
9년 전 | 557 | |
| 7828 | 9년 전 | 491 | ||
| 7827 | 9년 전 | 376 | ||
| 7826 | 9년 전 | 383 | ||
| 7825 | 9년 전 | 437 | ||
| 7824 | 9년 전 | 417 | ||
| 7823 | 9년 전 | 325 | ||
| 7822 | 9년 전 | 321 | ||
| 7821 | 9년 전 | 266 | ||
| 7820 | 9년 전 | 321 | ||
| 7819 |
|
9년 전 | 725 | |
| 7818 | 10년 전 | 339 | ||
| 7817 | 10년 전 | 459 | ||
| 7816 | 10년 전 | 362 | ||
| 7815 | 10년 전 | 568 | ||
| 7814 | 10년 전 | 393 | ||
| 7813 | 10년 전 | 338 | ||
| 7812 | 10년 전 | 348 | ||
| 7811 | 10년 전 | 365 | ||
| 7810 | 10년 전 | 499 | ||
| 7809 | 10년 전 | 439 | ||
| 7808 | 10년 전 | 308 | ||
| 7807 | 10년 전 | 365 | ||
| 7806 |
프로그래머7
|
10년 전 | 1309 | |
| 7805 | 10년 전 | 1230 | ||
| 7804 |
zahir1312
|
10년 전 | 747 | |
| 7803 |
|
10년 전 | 1347 | |
| 7802 | 10년 전 | 407 | ||
| 7801 | 10년 전 | 834 | ||
| 7800 | 10년 전 | 1058 | ||
| 7799 | 10년 전 | 508 | ||
| 7798 | 10년 전 | 462 | ||
| 7797 | 10년 전 | 457 | ||
| 7796 | 10년 전 | 304 | ||
| 7795 | 10년 전 | 457 | ||
| 7794 | 10년 전 | 485 | ||
| 7793 | 10년 전 | 1005 | ||
| 7792 | 10년 전 | 411 | ||
| 7791 | 10년 전 | 495 | ||
| 7790 | 10년 전 | 460 | ||
| 7789 |
fbastore
|
10년 전 | 1406 | |
| 7788 | 10년 전 | 493 | ||
| 7787 | 10년 전 | 358 | ||
| 7786 | 10년 전 | 511 | ||
| 7785 | 10년 전 | 533 | ||
| 7784 | 10년 전 | 597 | ||
| 7783 | 10년 전 | 400 | ||
| 7782 | 10년 전 | 449 | ||
| 7781 | 10년 전 | 860 | ||
| 7780 | 10년 전 | 781 | ||
| 7779 | 10년 전 | 752 | ||
| 7778 | 10년 전 | 319 | ||
| 7777 | 10년 전 | 406 | ||
| 7776 | 10년 전 | 409 | ||
| 7775 | 10년 전 | 345 | ||
| 7774 | 10년 전 | 603 | ||
| 7773 | 10년 전 | 332 | ||
| 7772 | 10년 전 | 671 | ||
| 7771 | 10년 전 | 332 | ||
| 7770 | 10년 전 | 616 | ||
| 7769 | 10년 전 | 335 | ||
| 7768 | 10년 전 | 549 | ||
| 7767 | 10년 전 | 1121 | ||
| 7766 | 10년 전 | 445 | ||
| 7765 | 10년 전 | 483 | ||
| 7764 |
잘살아보자
|
10년 전 | 329 | |
| 7763 |
|
10년 전 | 1403 | |
| 7762 |
Tosea
|
10년 전 | 1022 | |
| 7761 | 10년 전 | 614 | ||
| 7760 |
잘살아보자
|
10년 전 | 609 | |
| 7759 |
잘살아보자
|
10년 전 | 431 | |
| 7758 |
잘살아보자
|
10년 전 | 539 | |
| 7757 | 10년 전 | 1187 | ||
| 7756 |
ITBANK
|
10년 전 | 1220 | |
| 7755 | 10년 전 | 1898 | ||
| 7754 | 10년 전 | 1004 | ||
| 7753 | 10년 전 | 846 | ||
| 7752 | 10년 전 | 1351 | ||
| 7751 |
잘살아보자
|
10년 전 | 477 | |
| 7750 |
잘살아보자
|
10년 전 | 443 | |
| 7749 |
잘살아보자
|
10년 전 | 444 | |
| 7748 |
잘살아보자
|
10년 전 | 424 | |
| 7747 |
잘살아보자
|
10년 전 | 519 | |
| 7746 |
잘살아보자
|
10년 전 | 638 | |
| 7745 |
잘살아보자
|
10년 전 | 880 | |
| 7744 |
잘살아보자
|
10년 전 | 393 | |
| 7743 | 10년 전 | 913 | ||
| 7742 |
starbros
|
10년 전 | 791 | |
| 7741 |
잘살아보자
|
10년 전 | 616 | |
| 7740 |
잘살아보자
|
10년 전 | 482 | |
| 7739 |
잘살아보자
|
10년 전 | 440 | |
| 7738 |
잘살아보자
|
10년 전 | 493 | |
| 7737 |
잘살아보자
|
10년 전 | 452 | |
| 7736 |
잘살아보자
|
10년 전 | 473 | |
| 7735 |
잘살아보자
|
10년 전 | 807 | |
| 7734 |
잘살아보자
|
10년 전 | 402 | |
| 7733 |
잘살아보자
|
10년 전 | 500 | |
| 7732 |
잘살아보자
|
10년 전 | 655 | |
| 7731 |
잘살아보자
|
10년 전 | 583 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기