hholzgra / maposmatic

Mirror of maposmatic repository at savannah.nongnu.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Customizable zoom level

Phyks opened this issue · comments

Hi,

I've been using https://maposmatic.osm-baustelle.de/ quite a lot to print map backgrounds before hiking or surveying an area. An issue I often encounter is that "screen renders" are not always well suited for print. For instance, they tend to limit the number of items displayed at the same time to increase readability, although readability is not really an issue on paper.

Typical issues are:

  • Some elements might be missing on the map as they are only rendered at high zoom levels (Z18 for instance), although they would be perfectly readable on paper.
  • Some elements might be missing because the marker is overlapping with another element with higher precedence, however both could probably fit on the map.

One option to fix this would likely be to let user overload the zoom level at which the resulting PDF file will be generated. In other words, in terms of tiles, this would mean using larger tiles (from a higher zoom level) and reducing them to fit in the rendering area.

Looking at the code, however, it seems MapOSMatic is not using tiles at all but instead directly asking Mapnik to render the given area. Maybe the same effect could be achieved through higher DPIs? Sadly, I don't know much about direct rendering through Mapnik.

Thanks!

EDIT: Actually, I've just came across https://github.com/maposmatic/ocitysmap/blob/master/ocitysmap/layoutlib/single_page_renderers.py#L650. Does it mean the maps are always rendered at zoom 16? Or is it more sophisticated than this? Thanks!