Osmarender/Examples

From OpenStreetMap Wiki
Jump to navigation Jump to search

You may also find Osmarender/Tips section useful.

Large Map - Greater London

Greater London - See the image's Talk page for details on how it was made

A specific example of how to render a large map area (in this case Greater London) can be found here

Large Town / Small City Map

An example of generating a map for a large town / small city is needed

A scale value of around 0.2 - 0.4 works best. Very dense areas (eg around the centre of town) will probably have overlapping map features, but otherwise the features will generally be a suitable size compared to the gaps between them. The font sizes will probably be OK, but you may need to decrease the size of the name and ref entries for motorway, trunk and primary roads, so the labels don't obscure too many surrounding smaller roads.

You may wish to generate a second map just for the centre, at a higher scale, as areas with dense map features will be hard to make out on the main map.

Small Town / Suburb Map

An example of generating a map for a small town or a suburb is needed

A scale value of 0.3 will mean that the road names render at a roughly suitable size, but your map will be tiny compared to the logos, scale etc. You'll need to manually resize the logos by a factor of 10-20, otherwise they'll cover your whole map.

You may find that at a scale of 0.3, your road names may be too long to fit into the roads, and will be truncated. One way to address this is to use a smaller font size - for example, the default font size for residential roads is 1, but a size of 0.5 works better at a scale of 0.3 - look for the highway-unclassified-name style in your osm-map-features.xml file and edit as follows

 .highway-unclassified-name {
   fill: black;
   font-family: verdana;
   font-size: 0.5;
   font-weight: bold;
   baseline-shift: -35%;
 }

Village Map

An example of generating a map for a village, or other small area, is needed

You will probably want a scale factor of around 0.8 - 1.0. If a scale factor that's too small is used, many of your map features (roads etc) will overlap each other.

As you are using a large scale factor, you hopefully won't need to tweak the font sizes too much.