jQuery Mobile的&放大器;谷歌地图毛刺 [英] JQuery Mobile & Google Maps Glitch

查看:135
本文介绍了jQuery Mobile的&放大器;谷歌地图毛刺的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在多个页面上的我的手机应用程序,这是使用jQuery Mobile框架显示一个谷歌地图。我的应用程序仅仅是一个Android应用程序,使用web视图,并载入当地的.html页面(和.js文件)存放在资产目录。

I need to display a Google Map on multiple pages of my mobile app, which is using the JQuery Mobile framework. My app is just an Android app, using a webview, and loading local .html pages (and .js files) stored in the assets directory.

我第一次打开一个页面,上面有一张地图,地图上看起来不错,伟大工程。如果我回到这个页面,或者如果我打开另一个网页上有一个地图,网页加载时闪烁,然后在地图本身的故障。最初,只有约的地图图块左侧1/3是可见的。拖动周围的地图只会使问题变得更糟。这是因为如果地图不知道哪些瓷砖应该是加载。

The first time I bring up a page with a map on it, the map looks great and works great. If I return to this page, or if I open another page with a map on it, the page flickers when loading, and then the map itself glitches. Initially only about the left 1/3rd of the map tiles are visible. Dragging the map around only makes the problem worse. It's as if the map does not know which tiles it should be loading.

有运行jQuery Mobile框架多图页面没有人遇到的问题?如果一定要我大胆的猜测在这一点上,我猜想,jQuery Mobile框架的AJAX加载系统造成某种页面之间的干扰有关地图。我知道有办法关掉AJAX的支持,但我宁愿不这样做,如果我没有。

Has anyone encountered issues running multiple map pages on the JQuery Mobile framework? If I had to hazard a guess at this point, I would guess that the AJAX loading system of the JQuery Mobile framework is causing some kind of interference between the pages with regard to the map. I know there are ways to turn off the AJAX support, but I'd rather not do that if I don't have to.

推荐答案

我已经创建了我的学校使用jQuery Mobile框架的地图应用程序。因为使用AJAX的为您滚动加载谷歌地图,这是什么原因造成的视觉误差和缓慢的加载。

I have created a map application for my school using the jQuery Mobile Framework. Because of the use of AJAX to load the google map as you scroll, this is what is causing the visual errors and slow loading.

http://ceapps.weber.edu/tourdeweber

该地图的测试之一,让我知道,如果你的问题是相似的。

Test one of the maps, and let me know if your problem is similar.

我用的是 $ mobile.page.prototype.options.domCache = TRUE; 中初始化JQM存储您访问过的更快的性能,每一页

I use the $.mobile.page.prototype.options.domCache = true; within initializing the JQM to store each page you've visited for faster performance.

这篇关于jQuery Mobile的&放大器;谷歌地图毛刺的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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