Opened 17 hours ago
#24600 new enhancement
[PATCH] Add session support to pmtiles plugin
| Reported by: | AmyWorrall | Owned by: | taylor.smock |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugin pmtiles | Version: | |
| Keywords: | patch | Cc: |
Description
Suggested description:
This patch adds session save/load support for PMTiles image layers.
Problem
Currently, PMTiles layers are not included when saving a JOSM session (.jos/.joz).
Users have to manually re-add their PMTiles files each time they open a session.
Solution
Added SessionLayerExporter and SessionLayerImporter implementations for PMTilesImageLayer:
- PMTilesImageSessionExporter: Saves the file URI and layer name to session XML
- PMTilesImageSessionImporter: Restores the layer from session XML
Testing
Tested on macOS with a local PMTiles file:
- Open a .pmtiles file
- Save session
- Close JOSM and re-open
- Load session
- PMTiles layer is restored correctly


