Ignore:
Timestamp:
2019-11-03T22:22:25+01:00 (5 years ago)
Author:
donvip
Message:

see #josm16796 - update to JOSM 15502 - use IGpxTrack in GpxData (patch by Bjoeni)

Location:
applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java

    r35215 r35221  
    2626import org.openstreetmap.josm.data.Bounds;
    2727import org.openstreetmap.josm.data.coor.EastNorth;
    28 import org.openstreetmap.josm.data.gpx.GpxTrack;
     28import org.openstreetmap.josm.data.gpx.IGpxTrack;
    2929import org.openstreetmap.josm.data.gpx.IGpxTrackSegment;
    3030import org.openstreetmap.josm.data.gpx.WayPoint;
     
    219219        if (l instanceof GpxLayer && pos != null) {
    220220            GpxLayer gpxL = (GpxLayer) l;
    221             Set<GpxTrack> toRemove = new HashSet<>();
    222             for (GpxTrack track : gpxL.data.tracks) {
     221            Set<IGpxTrack> toRemove = new HashSet<>();
     222            for (IGpxTrack track : gpxL.data.tracks) {
    223223                boolean f = true;
    224224                sg: for (IGpxTrackSegment seg : track.getSegments()) {
     
    241241            double minDist = 1e9, d;
    242242            WayPoint wp = null, oldWp = null, prevWp = null;
    243             GpxTrack trk = null;
     243            IGpxTrack trk = null;
    244244            double maxD = mv.getDist100Pixel()/3;
    245             for (GpxTrack track : gpxL.data.tracks) {
     245            for (IGpxTrack track : gpxL.data.tracks) {
    246246                for (IGpxTrackSegment seg : track.getSegments()) {
    247247                    oldWp = null; // next segment will have new previous point
  • applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoPanel.java

    r35215 r35221  
    2020
    2121import org.openstreetmap.josm.data.SystemOfMeasurement;
    22 import org.openstreetmap.josm.data.gpx.GpxTrack;
     22import org.openstreetmap.josm.data.gpx.IGpxTrack;
    2323import org.openstreetmap.josm.data.gpx.IGpxTrackSegment;
    2424import org.openstreetmap.josm.data.gpx.WayPoint;
     
    3131class InfoPanel extends JPanel {
    3232
    33     private Collection<GpxTrack> tracks;
    34     private GpxTrack trk;
     33    private Collection<IGpxTrack> tracks;
     34    private IGpxTrack trk;
    3535
    3636    private JLabel label1 = new JLabel();
     
    7373            public void actionPerformed(ActionEvent e) {
    7474            if (tracks == null) return;
    75             Set<GpxTrack> toRemove = new HashSet<>();
     75            Set<IGpxTrack> toRemove = new HashSet<>();
    7676
    7777            double tm = -1;
     
    8484                }
    8585
    86             for (GpxTrack track : tracks) {
     86            for (IGpxTrack track : tracks) {
    8787                boolean f = true;
    8888                sg: for (IGpxTrackSegment seg : track.getSegments()) {
     
    102102    }
    103103
    104     void setData(WayPoint wp, GpxTrack trk, double vel, Collection<GpxTrack> tracks) {
     104    void setData(WayPoint wp, IGpxTrack trk, double vel, Collection<IGpxTrack> tracks) {
    105105        this.tracks = tracks;
    106106        this.trk = trk;
Note: See TracChangeset for help on using the changeset viewer.