Repository navigation
2026.2.0
Highlights
This second major release in the year 2026 adds the ability to overlay your own geometries on maps — drop in circle or icon markers, lines, and polygons directly, or load them from GeoJSON and GPX files via new add_* methods, the from_features/from_geojson/from_gpx classmethods (which can auto-fit the scale to your data with optional padding), and matching geojson and gpx CLI sub-commands. It also fixes broken URL templates for the Esri, USGS, ÖPNVKarte, and Mapy.cz tile providers.
Full Changelog
Added
- Added
papermap.features,papermap.geojsonandpapermap.gpxmodules to overlay geometries on the map.featuresexposesCircleMarker,IconMarker,LineandPolygondataclasses;geojson.geojson_to_features()parses GeoJSON files, dicts, or any object exposing__geo_interface__(honouringsimplestyle-specproperties);gpx.gpx_to_features()does the same for GPX. Features render above the base map but below the grid, and are clipped to the map area. - Added builder/loader methods on
PaperMap:add_circle_marker(),add_icon_marker(),add_line(),add_polygon(),add_feature(),add_geojson()andadd_gpx(). - Added
PaperMap.from_features(),PaperMap.from_geojson()andPaperMap.from_gpx()classmethods that build aPaperMapcentred on the supplied geometries' bounding box and pre-populate them on the new map. All three acceptauto_scaleandpaddingkeyword arguments: whenauto_scale=True, the scale is computed to fit the geometries within the printable image area (paper size minus margins minuspadding) and snapped up to the nearest common cartographic scale (1:1 000, 1:2 500, …, 1:50 000 000). Passing bothauto_scale=Trueand an explicitscaleraisesValueError. - Added
geojsonandgpxCLI sub-commands (e.g.papermap gpx hike.gpx Hike.pdf --auto-scale), with--auto-scaleand--paddingoptions in addition to the common CLI options. Reading GPX files from disk requires the optionalgpxpackage; install it withpip install papermap[gpx].
Fixed
- Fixed broken URL templates for the Esri, USGS, ÖPNVKarte, and Mapy.cz tile providers, where the upstream
server/MapServerhostnames and paths had been incorrectly renamed toprovider/MapProvider