키없이 버전 3.8 을 사용하고 있습니다. 나는이 정확한 코드를 내 바탕 화면에서 (키가없는) 사용했고 괜찮 았지만 지금은 어떤 이유로 작동하지 않는다.
오타를 찾을 수 없으며 사용중인 키가 변경되지 않고 가져 오기 선언이 있습니까? 그것이 작동하고
왜이 간단한 Google지도 코드가 작동하지 않습니까?
<!DOCTYPE html>
<html>
<head>
<title>asdfasdf</title>
</head>
<body onload = "initialize();">
<!-- map here -->
<div id = "map"></div>
<!-- Google Maps API -->
<script type = "text/javascript" src = "http://maps.googleapis.com/maps/api/js?&sensor=true&v=3.8"></script>
<script type = "text/javascript">
function initialize()
{
// object literal for map options
var myOptions =
{
center: new google.maps.LatLng(37.09024, -95.712891), // coordinates for center of map 30, 3
zoom: 4, // smaller number --> zoom out
mapTypeId: google.maps.MapTypeId.HYBRID // ROADMAP, SATELLITE, TERRAIN, or HYBRID
};
// note: if the id has a dash in its' name, map instantiation doesn't work!
var map = new google.maps.Map(document.getElementById("map"), myOptions);
} // end of initialize
</script>
</body>
</html>
변경 http://maps.googleapis.com/maps/api/js? & sensor = true & v = 3.8 to http://maps.googleapis.com/maps/api/js?&sensor=true&v=3.8 – Kotzilla