Skip to content

Instantly share code, notes, and snippets.

@jonathan-wcc
Created June 24, 2013 13:10
Show Gist options
  • Save jonathan-wcc/a2c1f56f63ea11930a04 to your computer and use it in GitHub Desktop.
Save jonathan-wcc/a2c1f56f63ea11930a04 to your computer and use it in GitHub Desktop.
MFP config.yaml - used with 1.2 and 2.0
#These two settings let the print server open lots of connections to the source dataset.
globalParallelFetches: 12
perHostParallelFetches: 4
#Connection timeouts for connecting to the map servers in ms
connectionTimeout: 60000
socketTimeout: 360000
#outputFilename: '${outputFilename}'
outputFilename: 'COMPASS-${yyyy-MM-dd}T${HHmmss}'
#path to non-default fonts
#slows down initial start so unused.
#fonts: {path}
#===========================================================================
# allowed DPIs
#===========================================================================
dpis:
- 300
#===========================================================================
# allowed Formats
#===========================================================================
# '*' means any formats
formats: ['*']
#===========================================================================
# the allowed scales
#===========================================================================
scales:
- 10000000
- 5000000
- 2500000
- 1250000
- 625000
- 300000
- 150000
- 75000
- 40000
- 20000
- 10000
- 5000
- 2500
- 1250
- 500
- 250
#===========================================================================
# the list of allowed hosts
#===========================================================================
hosts:
- !localMatch
dummy: true
- !dnsMatch
host: www.osmgb.org.uk
- !dnsMatch
host: wppgeog2
- !dnsMatch
host: wppgeog3
- !dnsMatch
host: compass
- !dnsMatch
host: geognosis-vip
#visible in things like adobe reader File->Properties
metaData:
title: '${mapTitle}'
author: 'COMPASS'
subject: '${mapComment}'
keywords: 'Web Map, COMPASS, Warwickshire, Warwickshire County Council'
creator: 'MapFish print module'
supportLegacyReader: false
layouts:
#===========================================================================
# A4 Portrait 597 x 842
#===========================================================================
A4 Portrait:
mainPage:
pageSize: A4
landscape: false
rotation: true
marginLeft: 30
marginRight: 30
marginTop: 30
marginBottom: 30
#backgroundPDF:
items:
#The Map
- !map
absoluteX: 32
absoluteY: 819
width: 535
height: 700
#The map border
#After the map so it is on top
- !columns
config:
borderWidth: 1
cells:
- borderColor: black
#padding is required otherwise the box will be empty
padding: 351
absoluteX: 31
absoluteY: 820
width: 537
#Blank item required or MapFish Print will fail badly.
items:
- !text
text: ''
#Legend
- !columns
#This line determines if the legend is shown in the template.
condition: legends
absoluteX: 37
absoluteY: 814
width: 160
config:
borderWidth: 1
cells:
- borderWidth: 1
borderColor: #555555
padding: 5
items:
- !legends
iconMaxWidth: 145
iconMaxHeight: 200
defaultScale: 0.5
maxWidth: 150
#Padding between layers
layerSpace: 5
layerFont: Helvetica
layerFontSize: 8
#Padding between text and icon within layer
classSpace: 2
classIndentation: 5
classFont: Helvetica
classFontSize: 8
backgroundColor: white
inline:true
#Attribution
- !columns
config:
borderWidth: 0
cells:
- padding: 0
absoluteX: 37
absoluteY: 133
width: 300
items:
- !text
fontSize: 9
align: left
text: '© Crown Copyright and database right ${now yyyy}. Ordnance Survey 100019520.'
#OverView map plus its black border
- !columns
absoluteX: 476
absoluteY: 115
width: 92
config:
borderWidth: 1
borderColor: black
cells:
- padding: 1
items:
- !map
width: 90
height: 90
overviewMap: 6
#Comments box
- !columns
config:
borderWidth: 0
cells:
- padding: 2
backgroundColor: white
absoluteX: 31
absoluteY: 99
width: 180
items:
- !text
fontSize: 9
align: left
text: '${mapComment}'
#WCC Logo
- !columns
absoluteX: 215
absoluteY: 70
width: 101
config:
borderWidth: 0
cells:
- padding: 0
items:
- !image
maxWidth: 100
spacingAfter: 100
align: center
url: 'file://${configDir}/WCC_Logo.jpg'
#ScaleBar
- !columns
absoluteX: 215
absoluteY: 90
width: 130
config:
borderWidth: 0
cells:
- padding: 0
items:
- !scalebar
align: center
maxSize: 130
type: 'line'
intervals: 2
#North Arrow taken from Wikipedia (from public domain)
- !columns
absoluteX: 325
absoluteY: 60
width: 30
config:
borderWidth: 0
cells:
- padding: 0
items:
- !image
maxWidth: 30
maxHeight: 30
url: 'file://${configDir}/Arrow_North_CFCF.svg'
rotation: '${rotation}'
#Warwickshire contact details
- !columns
config:
borderWidth: 0
cells:
- padding: 2
vertAlign: middle
absoluteX: 353
absoluteY: 90
width: 115
items:
- !text
fontSize: 8
align: center
text: "Warwickshire County Council\nShire Hall,\nWarwick,\nCV34 4RL\nTelephone: 01926 410410\nwww.warwickshire.gov.uk\nwarwickshiredirect\n@warwickshire.gov.uk"
#Date Box
- !columns
config:
borderWidth: 1
borderColor: black
cells:
- padding: 3
paddingBottom: 4
vertAlign: middle
absoluteX: 400
absoluteY: 115
width: 65
items:
- !text
fontSize: 10
align: center
text: '${now yyyy-MM-dd}'
#Title Box
#On the bottom so its borders are on top
#Don't show box if mapTitle not set.
- !columns
condition: mapTitle
config:
borderWidth: 1
borderColor: black
cells:
- padding: 0
paddingBottom: 3
backgroundColor: white
vertAlign: middle
absoluteX: 31
absoluteY: 115
width: 370
items:
- !text
fontSize: 14
align: center
text: '${mapTitle}'
#===========================================================================
# A4 Landscape 842 x 597
#===========================================================================
A4 Landscape:
mainPage:
pageSize: A4
landscape: true
rotation: true
marginLeft: 30
marginRight: 30
marginTop: 30
marginBottom: 30
#backgroundPDF:
items:
#The Map
- !map
absoluteX: 32
absoluteY: 565
width: 675
height: 542
#The map border
#After the map so it is on top
- !columns
config:
borderWidth: 1
cells:
- borderColor: black
#padding is required otherwise the box will be empty
padding: 272
absoluteX: 31
absoluteY: 566
width: 677
#Blank item required or MapFish Print will fail badly.
items:
- !text
text: ''
#Legend
- !columns
#This line determines if the legend is shown in the template.
condition: legends
absoluteX: 37
absoluteY: 560
width: 160
config:
borderWidth: 1
cells:
- borderWidth: 1
borderColor: #555555
padding: 5
items:
- !legends
iconMaxWidth: 145
iconMaxHeight: 200
defaultScale: 0.55
maxWidth: 150
#Padding between layers
layerSpace: 5
layerFont: Helvetica
layerFontSize: 8
#Padding between text and icon within layer
classSpace: 2
classIndentation: 5
classFont: Helvetica
classFontSize: 8
backgroundColor: white
inline:true
#Attribution
- !columns
config:
borderWidth: 0
cells:
- padding: 0
absoluteX: 37
absoluteY: 37
width: 300
items:
- !text
fontSize: 9
align: left
text: '© Crown Copyright and database right ${now yyyy}. Ordnance Survey 100019520.'
####################################
#Title Box
#On the bottom so its borders are on top
#Don't show box if mapTitle not set.
- !columns
condition: mapTitle
config:
borderWidth: 1
borderColor: black
cells:
- padding: 3
paddingBottom: 4
backgroundColor: white
vertAlign: middle
absoluteX: 710
absoluteY: 566
width: 113
items:
- !text
fontSize: 14
align: center
text: '${mapTitle}'
#Comments box
- !columns
config:
borderWidth: 0
cells:
- padding: 2
backgroundColor: white
absoluteX: 711
absoluteY: 490
width: 109
items:
- !text
fontSize: 10
align: center
text: '${mapComment}'
#Date Box
- !columns
config:
borderWidth: 1
borderColor: black
cells:
- padding: 3
paddingBottom: 4
vertAlign: middle
absoluteX: 710
absoluteY: 350
width: 113
items:
- !text
fontSize: 10
align: center
text: '${now yyyy-MM-dd}'
#North Arrow taken from Wikipedia (from public domain)
- !columns
absoluteX: 758
absoluteY: 320
width: 30
config:
borderWidth: 0
cells:
- padding: 0
items:
- !image
maxWidth: 30
maxHeight: 30
url: 'file://${configDir}/Arrow_North_CFCF.svg'
rotation: '${rotation}'
#ScaleBar
- !columns
absoluteX: 711
absoluteY: 280
width: 110
config:
borderWidth: 0
cells:
- padding: 0
items:
- !scalebar
align: center
maxSize: 110
type: 'line'
intervals: 2
#WCC Logo
- !columns
absoluteX: 711
absoluteY: 260
width: 111
config:
borderWidth: 0
cells:
- padding: 0
items:
- !image
maxWidth: 100
spacingAfter: 100
align: center
url: 'file://${configDir}/WCC_Logo.jpg'
#Warwickshire contact details
- !columns
config:
borderWidth: 0
cells:
- padding: 2
vertAlign: middle
absoluteX: 710
absoluteY: 210
width: 110
items:
- !text
fontSize: 8
align: center
text: "Warwickshire County Council\nShire Hall,\nWarwick,\nCV34 4RL\nTelephone: 01926 410410\nwww.warwickshire.gov.uk\nwarwickshiredirect\n@warwickshire.gov.uk"
#OverView map plus its black border
- !columns
absoluteX: 710
absoluteY: 135
width: 113
config:
borderWidth: 1
borderColor: black
cells:
- padding: 1
items:
- !map
width: 111
height: 111
overviewMap: 6
####################################
#Blurb border
- !columns
config:
borderWidth: 1
cells:
- borderColor: black
#padding is required otherwise the box will be empty
padding: 272
absoluteX: 710
absoluteY: 566
width: 113
#Blank item required or MapFish Print will fail badly.
items:
- !text
text: ''
#===========================================================================
# A3 Portrait 842 x 1188
#===========================================================================
A3 Portrait:
mainPage:
pageSize: A3
landscape: false
rotation: true
marginLeft: 30
marginRight: 30
marginTop: 30
marginBottom: 30
#backgroundPDF:
items:
#The Map
- !map
absoluteX: 32
absoluteY: 1160
width: 780
height: 1020
#The map border
#After the map so it is on top
- !columns
config:
borderWidth: 1
cells:
- borderColor: black
#padding is required otherwise the box will be empty
padding: 511
absoluteX: 31
absoluteY: 1161
width: 781
#Blank item required or MapFish Print will fail badly.
items:
- !text
text: ''
#Legend
- !columns
#This line determines if the legend is shown in the template.
condition: legends
absoluteX: 37
absoluteY: 1155
width: 200
config:
borderWidth: 1
cells:
- borderWidth: 1
borderColor: #555555
padding: 6
items:
- !legends
iconMaxWidth: 185
iconMaxHeight: 350
defaultScale: 0.85
maxWidth: 190
#Padding between layers
layerSpace: 6
layerFont: Helvetica
layerFontSize: 10
#Padding between text and icon within layer
classSpace: 2
classIndentation: 6
classFont: Helvetica
classFontSize: 10
backgroundColor: white
inline:true
#Attribution
- !columns
config:
borderWidth: 0
cells:
- padding: 0
absoluteX: 37
absoluteY: 155
width: 300
items:
- !text
fontSize: 9
align: left
text: '© Crown Copyright and database right ${now yyyy}. Ordnance Survey 100019520.'
#OverView map plus its black border
- !columns
absoluteX: 700
absoluteY: 135
width: 112
config:
borderWidth: 1
borderColor: black
cells:
- padding: 1
items:
- !map
width: 110
height: 110
overviewMap: 6
#Comments box
- !columns
config:
borderWidth: 0
cells:
- padding: 2
backgroundColor: white
absoluteX: 31
absoluteY: 110
width: 310
items:
- !text
fontSize: 12
align: left
text: '${mapComment}'
#WCC Logo
- !columns
absoluteX: 350
absoluteY: 75
width: 111
config:
borderWidth: 0
cells:
- padding: 0
items:
- !image
maxWidth: 110
spacingAfter: 110
align: center
url: 'file://${configDir}/WCC_Logo.jpg'
#ScaleBar
- !columns
absoluteX: 350
absoluteY: 100
width: 170
config:
borderWidth: 0
cells:
- padding: 0
items:
- !scalebar
align: center
maxSize: 170
type: 'line'
intervals: 2
#North Arrow taken from Wikipedia (from public domain)
- !columns
absoluteX: 480
absoluteY: 70
width: 45
config:
borderWidth: 0
cells:
- padding: 0
items:
- !image
maxWidth: 45
maxHeight: 45
url: 'file://${configDir}/Arrow_North_CFCF.svg'
rotation: '${rotation}'
#Warwickshire contact details
- !columns
config:
borderWidth: 0
cells:
- padding: 2
vertAlign: middle
absoluteX: 540
absoluteY: 110
width: 145
items:
- !text
fontSize: 10
align: center
text: "Warwickshire County Council\nShire Hall,\nWarwick,\nCV34 4RL\nTelephone: 01926 410410\nwww.warwickshire.gov.uk\nwarwickshiredirect\n@warwickshire.gov.uk"
#Date Box
- !columns
config:
borderWidth: 1
borderColor: black
cells:
- padding: 3
paddingBottom: 4
vertAlign: middle
absoluteX: 600
absoluteY: 135
width: 80
items:
- !text
fontSize: 11
align: center
text: '${now yyyy-MM-dd}'
#Title Box
#On the bottom so its borders are on top
- !columns
condition: mapTitle
config:
borderWidth: 1
borderColor: black
cells:
- padding: 0
paddingBottom: 3
backgroundColor: white
vertAlign: middle
absoluteX: 31
absoluteY: 135
width: 570
items:
- !text
fontSize: 15
align: center
text: '${mapTitle}'
#===========================================================================
# A3 Landscape 1188 x 842
#===========================================================================
A3 Landscape:
mainPage:
pageSize: A3
landscape: true
rotation: true
marginLeft: 30
marginRight: 30
marginTop: 30
marginBottom: 30
#backgroundPDF:
items:
#The Map
- !map
absoluteX: 32
absoluteY: 811
width: 1005
height: 780
#The map border
#After the map so it is on top
- !columns
config:
borderWidth: 1
cells:
- borderColor: black
#padding is required otherwise the box will be empty
padding: 391
absoluteX: 31
absoluteY: 812
width: 1006
#Blank item required or MapFish Print will fail badly.
items:
- !text
text: ''
#Legend
- !columns
#This line determines if the legend is shown in the template.
condition: legends
absoluteX: 37
absoluteY: 806
width: 200
config:
borderWidth: 1
cells:
- borderWidth: 1
borderColor: #555555
padding: 6
items:
- !legends
iconMaxWidth: 185
iconMaxHeight: 300
defaultScale: 0.85
maxWidth: 190
#Padding between layers
layerSpace: 6
layerFont: Helvetica
layerFontSize: 10
#Padding between text and icon within layer
classSpace: 2
classIndentation: 6
classFont: Helvetica
classFontSize: 10
backgroundColor: white
inline:true
#Attribution
- !columns
config:
borderWidth: 0
cells:
- padding: 0
absoluteX: 37
absoluteY: 47
width: 300
items:
- !text
fontSize: 9
align: left
text: '© Crown Copyright and database right ${now yyyy}. Ordnance Survey 100019520.'
####################################
#Title Box
#On the bottom so its borders are on top
- !columns
condition: mapTitle
config:
borderWidth: 1
borderColor: black
cells:
- padding: 3
paddingBottom: 3
backgroundColor: white
vertAlign: middle
absoluteX: 1044
absoluteY: 812
width: 113
items:
- !text
fontSize: 15
align: center
text: '${mapTitle}'
#Comments box
- !columns
config:
borderWidth: 0
cells:
- padding: 2
backgroundColor: white
absoluteX: 1046
absoluteY: 700
width: 109
items:
- !text
fontSize: 12
align: center
text: '${mapComment}'
#Date Box
- !columns
config:
borderWidth: 1
borderColor: black
cells:
- padding: 3
paddingBottom: 4
vertAlign: middle
absoluteX: 1044
absoluteY: 450
width: 113
items:
- !text
fontSize: 11
align: center
text: '${now yyyy-MM-dd}'
#North Arrow taken from Wikipedia (from public domain)
- !columns
absoluteX: 1088
absoluteY: 410
width: 45
config:
borderWidth: 0
cells:
- padding: 0
items:
- !image
maxWidth: 45
maxHeight: 45
url: 'file://${configDir}/Arrow_North_CFCF.svg'
rotation: '${rotation}'
#ScaleBar
- !columns
absoluteX: 1046
absoluteY: 345
width: 110
config:
borderWidth: 0
cells:
- padding: 0
items:
- !scalebar
align: center
maxSize: 110
type: 'line'
intervals: 2
#WCC Logo
- !columns
absoluteX: 1045
absoluteY: 320
width: 111
config:
borderWidth: 0
cells:
- padding: 0
items:
- !image
maxWidth: 110
spacingAfter: 110
align: center
url: 'file://${configDir}/WCC_Logo.jpg'
#Warwickshire contact details
- !columns
config:
borderWidth: 0
cells:
- padding: 2
vertAlign: middle
absoluteX: 1045
absoluteY: 255
width: 110
items:
- !text
fontSize: 9
align: center
text: "Warwickshire County Council\nShire Hall,\nWarwick,\nCV34 4RL\nTelephone: 01926 410410\nwww.warwickshire.gov.uk\nwarwickshiredirect\n@warwickshire.gov.uk"
#OverView map plus its black border
- !columns
absoluteX: 1044
absoluteY: 143
width: 113
config:
borderWidth: 1
borderColor: black
cells:
- padding: 1
items:
- !map
width: 111
height: 111
overviewMap: 6
######################
#Blurb border
#At very bottom so over-laps borders.
- !columns
config:
borderWidth: 1
cells:
- borderColor: black
#padding is required otherwise the box will be empty
padding: 391
absoluteX: 1044
absoluteY: 812
width: 113
#Blank item required or MapFish Print will fail badly.
items:
- !text
text: ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment