2017-03-16 60 views
1

後的問題是,當我使用下面的代碼,包括客戶端密鑰,以及在 拳頭進入頁面顯示爲空谷歌地圖出現,如果我調整一點點的瀏覽器顯示的地圖。谷歌地圖瀏覽器的大小改變

我無法弄清楚什麼是錯的... 任何幫助,請。

enter image description here

$(document).on("pagecreate", function (event) { 
 
\t \t \t  initMap(); 
 
     }); 
 

 
\t \t function initMap() 
 
\t \t { 
 
       var map_options = { 
 
\t \t \t \t center: new google.maps.LatLng(-16.5112321,-68.1224865), 
 
\t \t \t \t zoom: 20, 
 
\t \t \t \t mapTypeId: google.maps.MapTypeId.ROADMAP 
 
\t \t   } 
 

 
\t \t \t map_canvas = document.getElementById('googleMap'); 
 
\t \t \t var map = new google.maps.Map(map_canvas, map_options); 
 
\t \t }
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" /> 
 
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> 
 
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> 
 
<script src="https://maps.googleapis.com/maps/api/js"></script> 
 
<div id="googleMap" style="width:100%;height:400px;"></div>

+0

找到工作對我罰款 – APAD1

+0

@ APAD1它工作正常,在這裏,但不不是在jQuery Mobile的工作。 –

+0

請更新您的代碼來重現該問題,目前還不清楚你的意思。 – APAD1

回答