구글지도API 입니다.
그냥 편해요 붙여넣기만해도.. 덜덜
http://maps.googleapis.com/maps/api/js?sensor=false®ion=EN
우선 불러오고..
function googleMap(latitude,longitude)
{
var myLatlngc = new google.maps.LatLng(latitude,longitude);
var myLatlng = new google.maps.LatLng(latitude,longitude);
var myOptions = {
zoom: 17,
center: myLatlngc,
mapTypeId: google.maps.MapTypeId.ROADMAP }
var map = new google.maps.Map(document.getElementById("map"), myOptions);
var contentString = '여기는어디?';
var infowindow = new google.maps.InfoWindow({
content: contentString
});
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
infowindow.open(map,marker);
}
window.onload = function() {
googleMap(좌표1,좌표2);
};
aaa
<div class="map" id="map">
</div>
Comment Write
Comment List