-
Notifications
You must be signed in to change notification settings - Fork 4
Map
Andreas Fast edited this page Feb 13, 2016
·
2 revisions
The map
entry contains everything that is required of the map to be printed.
You need to indicate:
- South West latitude and longitude.
required
- North East latitude and longitude.
required
- Zoom level [0-18].
required
- Position (x,y) on the png or pdf.
optional
- Size in which to fit the resulting map.
optional
-
Layers Indicate what layers to print on the map, it's possible to combine many.
required
-
GeoJSON Indicate a GeoJSON with elements to be drawn on the map.
optional
map: {
sw: { # required
lat: -35.026862,
lng: -58.425003
},
ne: { # required
lat: -29.980172,
lng: -52.959305
},
zoom: 9, # required, whatever is supported by the source, typically between 1-15
position: { # Optional. x,y position on the PDF (as prawn determines it)
x: 50,
y: 50
},
size: { # Optional. Resize the map image, typically used to print the map on pdf
width: 500,
height: 800
},
layers: [{type: 'osm'}] # required
}