[英]jQuery Mobile - PhoneGap - Google maps not working
I have an issue when this application is bundled via PhoneGap the google maps doesn't load, however when viewing the same page via safari browser on the iPhone it works. 当通过PhoneGap捆绑此应用程序时,Google地图无法加载,但是在iPhone上通过Safari浏览器查看同一页面时,我遇到了问题。
I have debugged this application and identified the latlng doesn't get initialized: 我已经调试了该应用程序,并确定latlng没有被初始化:
var latlng = new google.maps.LatLng(latitude, longituide);
Here is the jsfiddle: 这是jsfiddle:
http://jsfiddle.net/kfcj4/
Please not that the map page is linked from an external page. 请注意,地图页面是从外部页面链接的。 So for whatever reason it doesn't intialize latlng..can you please tell me what I am missing here? 因此,无论出于何种原因,它都不会初始化。.您能告诉我我在这里缺少什么吗?
终于弄清楚了..您需要在index.html中包含它
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.