Generate pdf from OpenStreetMap tiles
npm install osm2pdf
Generate pdf with OpenStreetMap tiles.
!example output of osm2pdf with --route parameter
``bash`
sudo yarn global add osm2pdfor
sudo npm install -g osm2pdf
You need to provide a route in gpx format. You can download it e.g. on graphhopper website or bicycle planning website cycle.travel.
`bash`
osm2pdf --route --zoom=10 --input=path/to/route.gpx --output=path/to/output --tile-server=1
You need to provide GPS boundaries of the area you want to download.
`bash`
osm2pdf --map -n=70.923 -w=-4.373 -s=55.756 -e=27.872 --zoom=9 --output=path/to/output --tile-server=2
`bash`
osm2pdf --list-tile-servers
`bash``
osm2pdf -hor
osm2pdf --help
We use ECMAScript Modules which are supported since Node v8.
Tiles are provided by various tile servers. Please use their resources responsibly and follow their respective usage policies.