Ignore:
Timestamp:
2013-01-28T14:06:52+01:00 (11 years ago)
Author:
bastiK
Message:

add session support for marker layers (see #4029)

The data is exported to a separate GPX file that contains one waypoint for each marker.
This is not very elegant, because most of the time, all the info is already contained in the original GPX File.
However, when dealing with audio markers, they can be synchronized, or additional markers are added
at certain playback positions. This info must be retained.
Another complication is, that two or more MarkerLayers can be merged to one.

All these problems are avoided by explicitly exporting the markers to a separate file (as done in this commit).

File:
1 edited

Legend:

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

    r5670 r5684  
    6363        registerSessionLayerImporter("tracks", GpxTracksSessionImporter.class);
    6464        registerSessionLayerImporter("geoimage", GeoImageSessionImporter.class);
     65        registerSessionLayerImporter("markers", MarkerSessionImporter.class);
    6566    }
    6667
     
    305306                if (scaleEl != null && scaleEl.hasAttribute("meter-per-pixel")) {
    306307                    try {
    307                         Double meterPerPixel = Double.parseDouble(scaleEl.getAttribute("meter-per-pixel"));
     308                        double meterPerPixel = Double.parseDouble(scaleEl.getAttribute("meter-per-pixel"));
    308309                        Projection proj = Main.getProjection();
    309310                        // Get a "typical" distance in east/north units that
Note: See TracChangeset for help on using the changeset viewer.