Ignore:
Timestamp:
2008-02-21T19:53:16+01:00 (16 years ago)
Author:
david
Message:

(a) add preference dialog, (b) add audio tracing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java

    r552 r553  
    1616        public final LatLon latlon;
    1717        public final EastNorth eastNorth;
     18        public double time;
    1819
    1920        public WayPoint(LatLon ll) {
    2021                latlon = ll;
    21                 eastNorth = Main.proj.latlon2eastNorth(ll); 
     22                eastNorth = Main.proj.latlon2eastNorth(ll);
    2223        }
    2324
     
    3132         * @return seconds
    3233         */
    33         public double time () {
     34        public void setTime () {
    3435                if (! attr.containsKey("time"))
    35                         return 0.0;
     36                        time = 0.0;
    3637                SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); // ignore timezone
    3738                Date d = f.parse(attr.get("time").toString(), new ParsePosition(0));
    3839                if (d == null /* failed to parse */)
    39                         return 0.0;
    40                 return d.getTime() / 1000.0; /* ms => seconds */
     40                        time = 0.0;
     41                time = d.getTime() / 1000.0; /* ms => seconds */
    4142        }
    4243
Note: See TracChangeset for help on using the changeset viewer.