mirror of
https://github.com/marceloprates/prettymaps.git
synced 2026-09-26 09:11:55 +02:00
Implements the long-standing request in #64: read a recorded track and either frame the map around it, draw it over the map, or both. - `plot("track.gpx")` frames the map on the track (auto-choosing a radius that encloses it, unless one is given) and draws it. - `plot(query, gpx="track.gpx")` draws the track over a normal query. - `gpx` accepts a path or a list of paths; GPX and KML are both read. - `gpx_style` (or `style["gpx"]`) styles the track layer; it defaults to GPX_STYLE. The track is injected as a "gpx" layer, so it rides through the same projection, transform and drawing pipeline as every other layer (plot_gdf already renders LineString/MultiLineString). The reader (prettymaps/gpx.py) uses only the standard library and shapely, so this adds no dependencies. Supersedes the stale #80, which targeted the pre-1.0 architecture and only framed the map (it explicitly left drawing the track "for the future"). Tests in tests/test_gpx.py cover the reader (GPX, KML, multi-file, empty) and the plot() integration (auto-frame, overlay, custom style). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>