Changeset 23734 in osm for applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap
- Timestamp:
- 2010-10-21T22:37:58+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileLayer.java
r23721 r23734 161 161 int ele = (int) WayPointHelper.getElevation(wpt); 162 162 163 if (selWayPoint == null) { 164 if (lastWpt != null) { 165 int h1 = WayPointHelper.getHourOfWayPoint(wpt); 166 int h2 = WayPointHelper.getHourOfWayPoint(lastWpt); 167 if (h1 != h2) { // hour changed? 168 renderer.renderWayPoint(g, profile, mv, wpt, 169 ElevationWayPointKind.FullHour); 170 } else { // check for elevation gain 171 if (ele > lastEle) { 172 renderer.renderWayPoint(g, profile, mv, wpt, 173 ElevationWayPointKind.ElevationGain); 174 } else { 175 renderer.renderWayPoint(g, profile, mv, wpt, 176 ElevationWayPointKind.ElevationLoss); 177 } 178 } 179 } 180 } else { 181 if (selWayPoint == wpt) { 163 if (lastWpt != null) { 164 int h1 = WayPointHelper.getHourOfWayPoint(wpt); 165 int h2 = WayPointHelper.getHourOfWayPoint(lastWpt); 166 if (h1 != h2) { // hour changed? 182 167 renderer.renderWayPoint(g, profile, mv, wpt, 183 ElevationWayPointKind.Highlighted);184 } else { 168 ElevationWayPointKind.FullHour); 169 } else { // check for elevation gain 185 170 if (ele > lastEle) { 186 171 renderer.renderWayPoint(g, profile, mv, wpt, … … 193 178 } 194 179 195 // remember for next iteration180 // remember some things for next iteration 196 181 lastEle = (int) WayPointHelper.getElevation(wpt); 197 182 lastWpt = wpt; … … 199 184 } 200 185 186 // paint selected way point, if available 187 if (selWayPoint != null) { 188 renderer.renderWayPoint(g, profile, mv, selWayPoint, 189 ElevationWayPointKind.Highlighted); 190 } 191 192 // paint start/end 201 193 renderer.renderWayPoint(g, profile, mv, profile.getStartWayPoint(), 202 194 ElevationWayPointKind.StartPoint); 203 195 renderer.renderWayPoint(g, profile, mv, profile.getEndWayPoint(), 204 196 ElevationWayPointKind.EndPoint); 197 // paint min/max 205 198 renderer.renderWayPoint(g, profile, mv, profile.getMaxWayPoint(), 206 199 ElevationWayPointKind.MaxElevation);
Note:
See TracChangeset
for help on using the changeset viewer.