Render map tiles to pdf in the browser with arbitrary resolution.
- Simple demo in the browser
- HiDPI demo using basemap.at HiDPI tiles
- PDF download demo using Headless Chrome on Heroku
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) |
This project is named after the Swiss cartographer Eduard Imhof.
This project is licensed under the MIT license, see the LICENSE file.
- 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)