librelist archives

« back to archive

Printing of Legends/North Arrow

Printing of Legends/North Arrow

From:
Jude Mwenda
Date:
2011-05-06 @ 13:53
Hi,
Been looking at the printing functionalities and having the legend is always
encouraged. One needs to edit the config.yaml file that has properties on
legends. Below is a sample of what one could add to have legends enabled. To
have legible legends one needs to change the values of  maxIconWidth and
maxIconHeight. More info can be found here
        - !legends
          layerFont: Helvetica
          layerFontSize: 10
          layerSpace: 5
          maxIconWidth: 50
          maxIconHeight: 50
          classFont: Helvetica
          classFontSize: 20
          classSpace: 5
          classIndentation: 20
The other tip is on having North arrow. One needs to edit the config.yaml
file and add the following sample. So the sample below is an image. rotation
property is vital is showing the maps orientation. The url is also vital.
One can of course use their own styled arrow.
        - !image
          rotation: '${rotation}'
          maxWidth: 30
          maxHeight: 30
          url: '

http://trac.mapfish.org/trac/mapfish/export/2892/print/trunk/print-standalone/samples/Arrow_North_CFCF.svg
'
          align: right
Hope that will be of help

Regards