> From: Frederik Ramm [mailto:frede...@remote.org]
> Subject: [OSM-dev] "Retina" tiles - best way to support them?
> 
> Hi,
> 
>     I have had some people asking whether I could supply them with
> "Retina" map tiles. "Retina" is an Apple brand name for higher
> resolution displays, and these users tend to mean tiles with twice the
> resolution.
> 
> I wonder if anyone has done this already. I can think of a number of
> possible angles to attack this:
> 
> 1. Double all font sizes, line widths, etc. in the Mapnik style file
> (recent Mapnik versions also have a built-in scaling option that
> achieves about the same) and adapt all scale denominators accordingly.

I did some work on this for print where I wanted to print 1200 DPI maps. I
found that with one exception, everything just worked if I created a
mapnik.Image of the higher resolution and used an appropriate scale factor.
https://github.com/pnorman/mapbook/blob/master/mapbook.py#L201 is the
relevant section of the code. Unfortunately I haven't had time to work on it
lately.

The one exception to it just working is png POI graphics. These appear at a
reduced scale with mapnik's AGG renderer and at the same scale but blocky
with the mapnik cairo-based PDF renderer. This is an inherent limitation of
bitmapped graphics - it either looks tiny or it looks bad. Fonts and line
widths worked perfectly.

What I would suggest is a version of osm.xml which uses SVG icons instead of
PNG icons, allowing for use at any resolution. 

Some other points you'll find at high resolution
 - mapnik takes significantly more CPU time to render at high resolutions
 - The same style that works at ~100 DPI on a normal screen doesn't work at
1200 DPI printed, aside from any technical considerations.
 - The difference in appearance you get with each doubling of the resolution
decreases as you increase resolution so you may not want to go to the max
resolution of the device you have if it is > 300 DPI
 - DPI images are large and it takes planning to deal with them

Of the three options you listed, I find 3 the best - it keeps a given z/x/y
tile representing the same area.


_______________________________________________
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev

Reply via email to