modestmaps-js icon indicating copy to clipboard operation
modestmaps-js copied to clipboard

White lines when zoomed out

Open kkaefer opened this issue 13 years ago • 2 comments

When the overall zoom of the page isn't exactly 1, some white lines appear:

kkaefer avatar Aug 19 '11 07:08 kkaefer

Ah, tricky! I've seen this using page zoom inside browsers too (also on maps.google.com and bing.com/maps, FWIW). I guess a fix would be possible if you can find a cross-browser way to detect the zoom, and figure out how to adjust tile positioning to compensate?

http://stackoverflow.com/questions/1713771/how-to-detect-page-zoom-level-in-all-modern-browsers/5078596#5078596 lists some of the different methods you'll need. If you can get that working then you'll need to change the tile positioning code (@tmcw's new moveElement method, probably) so that the position and scale rounding takes the page zoom into account.

... If the main reason to do this is to get the map to display correctly in Spotlight previews then you're a more dedicated professional than I am ;)

RandomEtc avatar Aug 19 '11 16:08 RandomEtc

Heh, I've seen that issue in regular browsers before where the person accidentally zoomed in; Spotlight previews seem to be affected by this as well. I really just wanted to make a ticket for it. I'm aware that this is super tricky and rounding code is probably different in every rendering engine version.

kkaefer avatar Aug 19 '11 16:08 kkaefer