Tôi có ứng dụng PhoneGap iOS và có HTML này sẽ không hiển thị bản đồ trong ứng dụng. Tôi thấy bản đồ hoàn hảo trong Safari hoặc FF nhưng không có trong ứng dụng. Làm cách nào tôi có thể làm việc này?Google Map sẽ không hiển thị trong Phonegap iOS App
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var initialLocation = new google.maps.LatLng(37.654,-77.980);
var myOptions = {
zoom: 12,
center: initialLocation,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
});
</script>
</head>
<body>
<div data-role="content">
<!--images go here -->
<div class="img_shadow" style="padding:4px;">
<div id="map_canvas" style="height:130px;"></div>
</div>
</div>
</div><!-- /page -->
</body>
Khoá API không còn cần thiết trong Javascript-API của Google Maps nữa. –