MapFish Print 3

Printing maps like a boss

 

 

 

Tobias Sauerwein

Camptocamp

 

Camptocamp

Camptocamp

MapFish Print?

The past: MapFish Print 2

MapFish Print 3


Mapping

Layout

Plugin Framework

MapFish Print

Web API / Security / Widgets

Print Process

YAML Configuration


templates:
  A4 Portrait: !template
    reportTemplate: report.jrxml
    attributes:
      ...
    processors:
      ...
          

YAML Configuration (attributes)


templates:
  A4 Portrait: !template
    reportTemplate: report.jrxml
    attributes:
      title: !string {}
      map: !map
        width: 555
        height: 730
        maxDpi: 600
      scalebar: !scalebar
        width: 230
        height: 40
    processors:
      ...
          

YAML Configuration (processors)


templates:
  A4 Portrait: !template
    reportTemplate: report.jrxml
    attributes:
      ...
    processors:
    - !reportBuilder
      directory: '.'
    - !createMap
      inputMapper: {map: map}
      outputMapper: {mapSubReport: mapSubReport}
    - !createScalebar {}
          

Report Designer: Jaspersoft Studio

Print Request

{
  "layout": "A4 Portrait",
  "outputFormat": "pdf",
  "attributes": {
    "title": "Sample Print",
    "map": {
      "projection": "EPSG:3857",
      "dpi": 72,
      "center": [957352.8034848921, 5936844.140278816],
      "scale": 25000,
      "layers": [
        { "type": "osm", "baseURL": "http://tile.abc.com"}
      ]
    }
  }
}

Map Widgets

Supported Geo-Data

  • Vector
    • GML
    • GeoJSON
    • WFS
  • Raster
    • XYZ Tiles (OSM, ...)
    • (Tiled) WMS
    • WMTS
    • GeoTIFF

We got style!

  • Full GeoTools styling with SLD
  • MapFish Print 2 JSON styles (similar to OpenLayers 2 styles)
  • Improved JSON styles
"[INTERSECTS(geometry, buffer(POLYGON (...), 2000))]": {
  "symbolizers": [
    {
      "strokeColor": "green",
      "strokeWidth": 2,
      "type": "line"
    }
  ]
},

Maps are cool.

But we can do more!

Tables

What is more awesome than a map? More maps!

Multi-page maps

Charts

External datasources

Client side support

CGXP Plugin: cgxp.plugins.Print

Pluggable Architecture

Backwards Compatibility

  • Completely new configuration
  • Compatibility API for legacy clients

MapFish Print 3

MapFish Print on GitHub:
github.com/mapfish/mapfish-print

 

This presentation on GitHub:
github.com/tsauerwein/talks_fossgis2015

 

Me on GitHub/Twitter:
@tsauerwein