imhof
v0.1.2
Published
Render map tiles to pdf in the browser with arbitrary resolution.
Downloads
23
Maintainers
Readme
imhof
Render map tiles to pdf in the browser with arbitrary resolution.
Demo
- Simple demo in the browser
- HiDPI demo using basemap.at HiDPI tiles
- PDF download demo using Headless Chrome on Heroku
Usage
https://imhofjs.github.io/[?options]
For example
https://imhofjs.github.io/?lat=46.951083&lon=7.438639&zoom=15
The following options are available:
| Option | Value (default) | | -------- | --------------------------------------------------------------------- | | lat | Latitude, -90 to 90 | | lon | Longitude, -180 to 180 | | zoom | 0 to maxZoom (depends on tiles) | | geojson | URL pointing to a GeoJSON file | | renderer | [leaflet, static, static-jpeg] (leaflet) | | tiles | [OSM, basemap.at] (OSM) | | dpi | Map resolution in dots per inch (150) | | padding | Padding in mm (10) | | quality | Image quality for static-jpeg renderer (0.92) |
Name
This project is named after the Swiss cartographer Eduard Imhof.
License
This project is licensed under the MIT license, see the LICENSE file.
See Also
- static-map
- leaflet-image
- BigMap 2
- Static map API of Mapbox (account required, limited to 2560x2560 pixels)
- HiDPI tiles of Thunderforest, Mapbox, and MapTiler (accounts required)
