【发布时间】:2011-12-30 01:56:26
【问题描述】:
我有一个 PhoneGap iOS 应用程序,并且这个 HTML 不会在应用程序中显示地图。我在 Safari 或 FF 中完美地看到了地图,但在应用程序中却看不到。我怎样才能让它工作?
<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>
【问题讨论】:
标签: html ios google-maps-api-3 cordova