Skip to content
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

Crop transparent tiles when zooming #37

Open
kkaefer opened this issue Jun 16, 2011 · 2 comments
Open

Crop transparent tiles when zooming #37

kkaefer opened this issue Jun 16, 2011 · 2 comments

Comments

@kkaefer
Copy link

kkaefer commented Jun 16, 2011

When zooming in or out, Modest Maps overlays multiple layers. When they are translucent, this results in an odd effect as shown in http://i.kkaefer.com/transparent_overlap-20110616-203545.png. Modest Maps should crop the tile so that only the most appropriate layer is visible.

@RandomEtc
Copy link
Contributor

To do this effectively we would need to change the way that "parent" tiles are shown when the "ideal" tile isn't available. Right now you're seeing artefacts because we simply scale up the tile to cover all four "child" tiles (or 16, or 64, etc.). Another way to do this would be to create temporary tiles at the ideal zoom level using a div and offset the best available image (or use a background image) scaled up to compensate for the missing region.

It's not a simple matter of cropping because as ideal tiles come in the old tiles need selectively hiding. This would mean punching holes in the old tile, not possible in a cross browser way without re-architecting as I describe. Could be interesting to re-think Modest Maps as only displaying ideal tiles and using whatever images are available in the cache to patch up the best 256px representation. Some clever use of divs and overflow:hidden, or some clever use of CSS background images should do it. Volunteers?

@mourner
Copy link

mourner commented Jun 16, 2011

I thought about this feature too. In theory, it can be done using backgrounds on tile images with CSS3 background-size property (to scale tiles) and multiple backgrounds (for zoom-out), though it seems a lot of hassle reachitecting zooming code for quite a small benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants