Changeset 16865 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2020-08-10T23:19:07+02:00 (4 years ago)
Author:
simon04
Message:

see #15441 - Support GpxRouteLayer in session import/export

Location:
trunk/src/org/openstreetmap/josm/io/session
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java

    r9983 r16865  
    2222     */
    2323    public GpxTracksSessionExporter(GpxLayer layer) { // NO_UCD (test only)
    24         super(layer, "tracks", "0.1", "gpx");
     24        this(layer, "tracks");
     25    }
     26
     27    protected GpxTracksSessionExporter(GpxLayer layer, String type) {
     28        super(layer, type, "0.1", "gpx");
    2529    }
    2630
  • trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java

    r15247 r16865  
    5656
    5757                support.addPostLayersTask(importData.getPostLayerTask());
    58                 return importData.getGpxLayer();
     58                return getLayer(importData);
    5959            }
    6060
     
    6363        }
    6464    }
     65
     66    protected Layer getLayer(GpxImporter.GpxImporterData importData) {
     67        return importData.getGpxLayer();
     68    }
    6569}
  • trunk/src/org/openstreetmap/josm/io/session/SessionReader.java

    r16643 r16865  
    166166        registerSessionLayerImporter("imagery", ImagerySessionImporter.class);
    167167        registerSessionLayerImporter("tracks", GpxTracksSessionImporter.class);
     168        registerSessionLayerImporter("routes", GpxRoutesSessionImporter.class);
    168169        registerSessionLayerImporter("geoimage", GeoImageSessionImporter.class);
    169170        registerSessionLayerImporter("markers", MarkerSessionImporter.class);
  • trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java

    r15717 r16865  
    3333import org.openstreetmap.josm.gui.MapView;
    3434import org.openstreetmap.josm.gui.layer.GpxLayer;
     35import org.openstreetmap.josm.gui.layer.GpxRouteLayer;
    3536import org.openstreetmap.josm.gui.layer.Layer;
    3637import org.openstreetmap.josm.gui.layer.NoteLayer;
     
    7374        registerSessionLayerExporter(WMTSLayer.class, ImagerySessionExporter.class);
    7475        registerSessionLayerExporter(GpxLayer.class, GpxTracksSessionExporter.class);
     76        registerSessionLayerExporter(GpxRouteLayer.class, GpxRoutesSessionExporter.class);
    7577        registerSessionLayerExporter(GeoImageLayer.class, GeoImageSessionExporter.class);
    7678        registerSessionLayerExporter(MarkerLayer.class, MarkerSessionExporter.class);
Note: See TracChangeset for help on using the changeset viewer.