简体   繁体   English

OpenLayers在iPad上显示白色瓷砖

[英]OpenLayers shows white tiles on iPad

I'm experiencing some issues to do with OpenLayers in an UIWebView on the iPad. 我在iPad上的UIWebView中遇到一些与OpenLayers有关的问题。 It's offline tile based layer loading locally from the users documents directory. 它是基于离线图块的图层,可从用户文档目录本地加载。 Some tiles appear white and do not change until I change zoom levels, or scroll them far off the screen. 有些磁贴显示为白色,并且直到我更改缩放级别或将其滚动到屏幕之外时才改变。 However, this doesn't appear to be an issue that setting the number of retries will solve as I changed the missing tile color to red and it still appears white. 但是,当我将丢失的图块颜色更改为红色并且仍显示为白色时,设置重试次数将不会解决的问题。

I'm wondering if the iPad is giving up on rendering the tiles due to memory constraints? 我想知道iPad是否由于内存限制而放弃渲染图块?

请尝试尝试此方法,并告诉我们您是否仍然有问题。

OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;

我刚刚解决了这个问题,似乎src从未使用标准的Image.clear()方法发布,我花了一些时间并进行了调整才能使其正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM