Changeset 33722 in osm for applications/editors/josm/plugins/infomode
- Timestamp:
- 2017-10-19T00:32:43+02:00 (7 years ago)
- 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
r33720 r33722 290 290 if (prevWp != null && wp.time != prevWp.time) { 291 291 vel = wp.getCoor().greatCircleDistance(prevWp.getCoor())/ 292 (wp.time-prevWp.time) *3.6;292 (wp.time-prevWp.time); 293 293 } 294 294 infoPanel.setData(wp, trk, vel, gpxL.data.tracks); -
applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoPanel.java
r33721 r33722 19 19 import javax.swing.JPanel; 20 20 21 import org.openstreetmap.josm.data.SystemOfMeasurement; 21 22 import org.openstreetmap.josm.data.gpx.GpxTrack; 22 23 import org.openstreetmap.josm.data.gpx.GpxTrackSegment; … … 111 112 but2.setVisible(true); 112 113 } 113 if (vel > 0) label2.setText(String.format("%.1f "+tr("km/h"), vel)); 114 else label2.setText(null); 114 if (vel > 0) { 115 SystemOfMeasurement som = SystemOfMeasurement.getSystemOfMeasurement(); 116 label2.setText(String.format("%.1f "+som.speedName, vel * som.speedValue)); 117 } else { 118 label2.setText(null); 119 } 115 120 String s = (String) trk.getAttributes().get("name"); 116 121 if (s != null)
Note:
See TracChangeset
for help on using the changeset viewer.