Skip to content
forked from osm2pdf/osm2pdf

Generate pdf with OpenStreetMap tiles

License

Notifications You must be signed in to change notification settings

NanoNabla/osm2pdf

 
 

Repository files navigation

OSM map to pdf

Generate pdf with OpenStreetMap tiles.

example output of osm2pdf with --route parameter

Install

sudo yarn global add osm2pdf
# or
sudo npm install -g osm2pdf

Use

Download a route

You need to provide a route in gpx format. You can download it e.g. on graphhopper website or bicycle planning website cycle.travel.

osm2pdf --route --zoom=10 --input=path/to/route.gpx --output=path/to/output --tile-server=1

Download a map

You need to provide GPS boundaries of the area you want to download.

osm2pdf -n=70.923 -w=-4.373 -s=55.756 -e=27.872 --zoom=9 --output=path/to/output --tile-server=2

Show available tile servers

osm2pdf --list-tile-servers

Help

osm2pdf -h
# or
osm2pdf --help

Node compatibility

We use ECMAScript Modules which are supported since Node v8.

Use responsibly

Tiles are provided by various tile servers. Please use their resources responsibly and follow their respective usage policies.

About

Generate pdf with OpenStreetMap tiles

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 95.7%
  • JavaScript 4.3%