Browse Source

add example and improve readme

mrkvon 2 years ago
parent
commit
7e3d1bfcb0
2 changed files with 14 additions and 6 deletions
  1. 14
    6
      README.md
  2. BIN
      example.png

+ 14
- 6
README.md View File

@@ -2,6 +2,8 @@
2 2
 
3 3
 Generate pdf with [OpenStreetMap](https://openstreetmap.org) tiles.
4 4
 
5
+![example output of osm2pdf with --path parameter](example.png)
6
+
5 7
 ## Video
6 8
 
7 9
 [![How to download OpenStreetMap with osm2pdf](https://img.youtube.com/vi/DiPj8yaXapA/0.jpg)](https://youtu.be/DiPj8yaXapA)
@@ -16,20 +18,26 @@ sudo npm install -g osm2pdf
16 18
 
17 19
 ## Use
18 20
 
19
-### Download a map
20 21
 
21
-You need to provide boundaries of the area you want to download.
22
+### Download a route
23
+
24
+You need to provide a route in gpx format. You can download it on [graphhopper website](https://graphhopper.com/maps/). Find your route and click _GPX export_ button.
22 25
 
23 26
 ```bash
24
-osm2pdf --north=70.923 --west=-4.373 --south=55.756 --east=27.872 --zoom=9
27
+osm2pdf --route --zoom=10 --input=path/to/route.gpx --output=path/to/output
25 28
 ```
26 29
 
27
-### Download a route
30
+or if you want to also draw the path on the map
28 31
 
29
-You need to provide a route in gpx format. You can download it on [graphhopper website](https://graphhopper.com/maps/). Find your route and click _GPX export_ button.
32
+```bash
33
+osm2pdf --path --zoom=10 --input=path/to/route.gpx --output=path/to/output
34
+```
35
+### Download a map
36
+
37
+You need to provide boundaries of the area you want to download.
30 38
 
31 39
 ```bash
32
-osm2pdf --route --zoom=10 --input=path/to/route.gpx
40
+osm2pdf --north=70.923 --west=-4.373 --south=55.756 --east=27.872 --zoom=9 --output=path/to/output
33 41
 ```
34 42
 
35 43
 ## Help

BIN
example.png View File