Jquery移动刷新加载地图API v3
jquery mobile refresh to load map api v3
我必须刷新一次页面才能加载地图。你可以看看下面的链接:
http://metartestmobile.netau.net/template/listview.html
当我移动这一行(<script src="http://code.jquery.com/jquery-1.11.0-beta2.js"></script>
)
但是我想用那一行…
这是listview.html
文件
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="themes/Bootstrap.css">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile.structure-1.4.0.min.css" />
<link rel="stylesheet" href="themes/jquery.mobile.icons.min.css" />
<script src="http://code.jquery.com/jquery-1.11.0-beta2.js"></script>
<script src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div data-role="page" id="my-page" >
<div data-role="content" data-theme="a">
<ul data-role="listview" data-inset="true" data-divider-theme="f">
<li data-role="list-divider">Weather</li>
<li data-icon="arrow-r"><a href="map.html" data-transition="flip" >Humidity-Rain</a></li>
</ul>
</div>
</div>
</body>
</html>
和map.html
<html>
<head>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<link rel="stylesheet" href="themes/Bootstrap.css">
<script type="text/javascript">
var infowindow;
var map;
function initialize() {
var myLatlng = new google.maps.LatLng(38.822590,24.653320);
var myOptions = {
zoom: 6,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
}
</script>
</head>
<body onload="initialize()">
<div data-role="content">
<div id="map_canvas" ></div>
</div>
</body>
</html>
jquery移动端默认使用ajax加载页面。所以改变这个
a href="map.html" data-transition="flip"
a href="map.html" data-transition="flip" rel="external"
则jquery手机刷新孔页面。
相关文章:
- 谷歌地图API v3不适用于移动浏览器或PhoneGap
- 单击超链接时,如何使用Google Maps API v3缩放地图
- 标记的实时更新,无需加载页面谷歌地图API V3
- 覆盖在赢得'不允许点击下面的标记,谷歌地图api v3
- 如何在多承诺链中处理谷歌地图API V3事件
- 谷歌地图API v3:Initial View is Fine,but Gray Box with No Map if
- 使用Google Maps JavaScript API v3和Geocoding API映射多个位置
- 使用谷歌地图api v3自动完成字段(法国大道、邮编、城市)
- 如何在谷歌地图api v3中获得无公里驾驶距离
- 如何在Maps API v3.中更改多段线的路径
- 谷歌地图API v3:处理使用限制限制
- gmaps API v3在IE上加载非常慢
- 在谷歌api v3中使用地理自动完成功能获取邮政编码
- markrimage在谷歌地图api v3中的特定位置后消失
- 如何修改此功能以获得最受欢迎的视频?(YouTube API v3)
- 映射API v3标记在单击时消失
- 如何限制谷歌地图API V3半径搜索仅限于圆圈内的标记
- 谷歌应用程序脚本html服务和加载谷歌地图javascript api V3
- 加载Google MAPS API v3的JSON数据
- 没有显示带有Infobox PHP/SQL的Google Map API v3