如果我通过Ajax向后导航,为什么标记最终会出现在左上角? [英] Why do my markers end up at the top left corner if I navigate back via ajax?

查看:64
本文介绍了如果我通过Ajax向后导航,为什么标记最终会出现在左上角?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://jquerymobile.com 中的页面上使用Google Map时;如果您导航离开,然后返回地图页面,则所有标记都将位于左上角.

When using a Google Map on a page in http://jquerymobile.com; if one navigates away and then back to the map page all the markers end up at the top left corner.

示例:

我的jQuery JavaScript代码段的开头:

The start of my jQuery JavaScript snippet:

$('.page-map').live('pageinit', function() {
...do stuff.
}

推荐答案

将'pageinit'更改为'pageshow':

Change 'pageinit' to 'pageshow':

$('.page-map').live('pageshow', function() {
...do stuff.
}

这篇关于如果我通过Ajax向后导航,为什么标记最终会出现在左上角?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆