stamen / modestmaps-js

Modest Maps javascript port
http://modestmaps.com
566 stars 152 forks source link

White lines when zoomed out #53

Open kkaefer opened 13 years ago

kkaefer commented 13 years ago

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

RandomEtc commented 13 years ago

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 ;)

kkaefer commented 13 years ago

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.