나는 내 문제에 대한 해결책을 많이 읽었지만 그 중 아무 것도 나를 위해 일하지 않았습니다. 내지도가 여기에 Google지도는 로딩되지 않습니다
를로드하지 않는 것은 내 HTML<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
<script>
var map;
function initialize() {
var mapOptions = {
zoom: 8,
center: new google.maps.LatLng(41.7429109,24.391538699999955)
};
map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body onload="initialize()">
<div id="map_canvas"></div>
</body>
이다 나는 문제가 여기 어딘가에 생각 CSS는
는body {
height:100%;
width:100%;
margin: 0;
padding: 0;
line-height: 1.5em;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 12px;
color: #666;
background:#302f2f ;
}
#map_canvas {
width:300px;
height:300px;
}
그래서 당신의 HTML 요소의 ID를 가지고
map-canvas와 같지 않음 –