내 앱에 Google지도를 통합하려고합니다. API v3 문서를 읽었으며 API 키를 생성했지만지도는 시간당 약 1 시간 동안로드됩니다. 다른 시간대 앞지도Google지도 : 로컬 호스트에 표시되지 않음
내가지도에 사용이 코드는 내 HTML 헤더에 렌더링 비어 :
<script src = "https://maps.googleapis.com/maps/api/js?key=HERE-IS-MY-UNIQUE-KEY"></script>
<script>
var geocoder;
var map;
function initialize() {
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(51.5073509,-0.1277583);
var mapOptions = {
zoom: 10,
center: latlng
}
map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
을 그리고 여기에 HTML의 코드입니다 :
...
<div class="form-group">
<div class="col-sm-8">
<div id="map-canvas" style="height:200px;width:400px;"></div>
</div>
</div>
...
것은 무슨 일을 할 수있다 이리? 맵이 정규 기본에서 렌더링되지 않는 이유는 무엇입니까?
지오 코더 (Geocoder) 부품을 꺼내면 말하긴 어렵지만 작동합니까? 오류 메시지 나 다른 것이 있습니까? 문제에 대해 가능한 한 많은 정보를 제공 할 수 있다면 좋을 것입니다 ... "내 코드 수정에 도움"질문은 일반적으로 여기에서 너무 친절하게 다루어지지 않습니다. – Yumecosmos
키를 제거하면 어떻게됩니까? –