Skip to content
Andreas Fast edited this page Feb 13, 2016 · 10 revisions

Welcome to the map_print wiki!

Here we will cover the configuration for the several functionalities available in map_print.

Purpose

The purpose of MapPrint is to provide a way to print maps from different sources to png or pdf. Not only base layers like bing or osm but also GeoJSON specified elements on the map. It also provides ways to create elements around the maps like placing images, texts, a scalebar or a legend!

Usage

The usage is mainly to create a huge hash which contains all the information for the map, and generate it using that information.

This hash consists of some high level entries:

  • Format

    Specify either png or pdf.

  • PDF Options

    PDF Options are directly passed on to Prawn to generate the pdf document. See here for more info. Will be ignored if format is png.

  • PNG Options

    Includes dimensions and background color. Will be ignored if format is pdf.

  • Map

    Contains bounding latitudes and longitudes, as well as zoom, position and printed final size. It also contains the layers and GeoJSON.

    • Layers Indicate what layers to print on the map, it's possible to combine many
    • GeoJSON Indicate a GeoJSON with elements to be drawn on the map.
  • Scalebar

    Place a scalebar anywhere on the image or pdf. Over the map or elsewhere!

  • Legend

    Use for reference of objects printed on top of the map

  • Images

    Place images anywhere on the png or pdf. Allowing you to place logos and other references.

  • Texts

    You can place descriptions of your map around it.

Clone this wiki locally