-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS (iPad) map animated dragging tile refresh bug #511
Conversation
What if you disable tile animation entirely with:
? |
Fixed! |
Fixed for you, not for me :-) |
Do you use any toolkit like Sencha Touch in addition to OpenLayers? |
No, I've written a lot of code around OpenLayers to deal with SVG and canvas polylines as well as the POI markers, and I deal natively with the touch and gesture events. I also stripped some unnecessary code to have a lighter js file. |
What specific OpenLayers example(s) could I use to easily reproduce the problem? |
hummm it seems to have been fixed for some ipads.... others still show the issue. I tested on an ipad 3 and on an iphone 4 and the issue happened. |
you can also observe it better when you do a big scroll and it has to load lots of tiles (rows and columns) |
http://www.openlayers.org/dev/examples/mobile.html works fine on my iPhone 4S. I'll try in an iPad 2. |
hum... your example in particular has the flicker effect even in my chrome browser. What happens is that it starts loading some tiles, then seems to abort, resets a position, clears the screen and restarts loading the tiles, instead of loading just the missing tiles. It happens when you do a "touch start - drag - release - animated innercia effect - stop" |
and it doesn't happen every time... do long diagonal drags. |
In mobile.html I do see flashes in an iPad 2, but not in Chrome 19. |
I'm now seeing the blinking in the iPhone 4S. It's not as striking as in the iPad because there are only four tiles on iPhone to cover the viewport. It is certain that the issue is related to the fade transition of tiles, but I don't know how to fix it. |
I don't think it's related to animation anymore... my tiles just pop up. I'm thinking that maybe the tile refresh algorithm starts to add rows and columns and loading images and somehow a full refresh is triggered (like when you pan to an offscreen position - and it just starts from scratch). Can this be the problem? |
I'm no longer sure we're looking at the same issue. In my case I see the tiles blinking when panning or zooming. This issue is related to tile animation, for sure. You're talking about a different issue, aren't you? |
I'm not really sure,
The tiles will only be loaded, when the map stops moving. All that together must have acted in a way that increased the occurrence of those blinks. |
Does adding the following CSS rule fix it for you
? It fixes the tile blinking issue for me on iPhone 4S and iPad 2 (iOS 5). |
…etter performance on iOS, and to prevent tile blinking effects on iOS 5
My mobilecss branch includes changes I'd like to make for 2.12: elemoine/openlayers@openlayers:2.12...mobilecss Thanks a lot @tonio and @ajscarvalho for the collaboration on this! |
I've attached my branch's commits to this issue. @ajscarvalho I'm hoping my branch works for you, so I can merge it into 2.12 and release 2.12 RC7. |
i'll only be able to test it monday, I'll come back to you on this issue by |
Can't speak for ajscarvalho, but I have an OpenLayers webapp targeting the iPad in which I've been seeing the full-screen flicker, and this CSS tweak seems to fix it for me. I've been testing with an iPad 2, iOS 4.2 |
@adv-isu thanks a lot for your feedback. I'm very interested to know if this fix works for people. |
Just adding that rule, doesn't work for me. It has a strange effect that I really don't know how to describe... |
@ajscarvalho do you mean that the new commits make things worse for you? |
Yup, but I'm merging with this dev version (js), and things seem to have become stabler. Unfortunately I cannot just pull everything, and I'm merging and trying to check if it broke, where, etc... |
okay after the merge, the ipad shown no more flicker issues... But I do get them in the sony tablet (slow, android 4) |
may it be related to the fact that OpenLayers.Animation.isNative is false on the sony tablet? |
@ajscarvalho |
http://caniuse.com/#search=requestAnimationFrame |
also happens in galaxy tab 2 (android 4) and after I have merged with you (might not be your fault) it is now restarting the browser |
You don't need to merge anything to test someone else's branch. Just add a remote to the developer's GitHub repo and check out his branch:
Hope this helps. |
Yup but I have made some small changes directly in your classes and I tested your code with and without my changes |
Ok, I'm going to merge this pull request's commits, as they do bring substantial improvements on iOS 4 and 5. Further investigation on Android is very welcome though. |
iOS (iPad) map animated dragging tile refresh bug
I noticed that when you drag the map in an iPad, when the window has to get new tiles the ios browser, most times it refreshes the whole screen and it flickers a lot. It is noticeable even in an iPad 2 with iOS 5.
I also noticed that it happens when browsing your examples page.
I already digged into the Open Layers classes and tried to change some parts to make sure that the images and divs have the right size, but none of my efforts produced any effect.