-
[구글맵] 마커대신 이미지 넣기!구글맵 만들기 2011. 6. 16. 14:48반응형
<!DOCTYPE html>
<html>
<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 Example: Simple Icons</title>
<link href="http://code.google.com/apis/maps/ documentation/_javascript/examples/default.css" rel="stylesheet" type="text/css" />
<script type="text/_javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/_javascript">
function initialize() {
var myOptions = {
zoom: 4,
center: new google.maps.LatLng(-33, 151),
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map( document.getElementById("map_canvas"),
myOptions);var image = 'images/beachflag.png';
var myLatLng = new google.maps.LatLng(-33.890542, 151.274856);
var beachMarker = new google.maps.Marker({
position: myLatLng,
map: map,
icon: image
});
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas"></div>
</body>
</html>'구글맵 만들기' 카테고리의 다른 글
구글맵에서 좌표로 주소 가져요기! (0) 2012.05.13 구글맵에서 주소로 좌표 가져오기! (0) 2012.05.13 [구글맵] 마커 여러개 찍기! (0) 2011.06.16