Ticket #3222: diff
| File diff, 4.7 KB (added by , 16 years ago) |
|---|
-
src/org/openstreetmap/josm/gui/layer/GpxLayer.java
421 421 lines = Main.pref.getBoolean(linesKey); 422 422 // paint large dots for points 423 423 boolean large = Main.pref.getBoolean("draw.rawgps.large"); 424 boolean hdopcircle = Main.pref.getBoolean("draw.rawgps.hdopcircle", true); 424 425 // color the lines 425 426 colorModes colored = colorModes.none; 426 427 try { … … 593 594 } // end for trk 594 595 } // end if lines 595 596 597 596 598 /**************************************************************** 597 ********** STEP 3d - DRAW LARGE POINTS *************************599 ********** STEP 3d - DRAW LARGE POINTS AND HDOP CIRCLE ********* 598 600 ****************************************************************/ 599 if (large ) {601 if (large || hdopcircle) { 600 602 g.setColor(neutralColor); 601 603 for (GpxTrack trk : data.tracks) { 602 604 for (Collection<WayPoint> segment : trk.trackSegs) { … … 606 608 continue; 607 609 Point screen = mv.getPoint(trkPnt.getEastNorth()); 608 610 g.setColor(trkPnt.customColoring); 609 g.fillRect(screen.x-1, screen.y-1, 3, 3); 611 if (hdopcircle && trkPnt.attr.get("hdop") != null) { 612 // hdop value 613 float hdop = ((Float)trkPnt.attr.get("hdop")).floatValue(); 614 if (hdop < 0) { 615 hdop = 0; 616 } 617 // hdop pixels 618 int hdopp = mv.getPoint(new LatLon(trkPnt.getCoor().lat(), trkPnt.getCoor().lon() + 2*6*hdop*360/40000000)).x - screen.x; 619 g.drawArc(screen.x-hdopp/2, screen.y-hdopp/2, hdopp, hdopp, 0, 360); 620 } 621 if (large) { 622 g.fillRect(screen.x-1, screen.y-1, 3, 3); 623 } 610 624 } // end for trkpnt 611 625 } // end for segment 612 626 } // end for trk 613 } // end if large 627 } // end if large || hdopcircle 614 628 615 629 /**************************************************************** 616 630 ********** STEP 3e - DRAW SMALL POINTS FOR LINES *************** -
src/org/openstreetmap/josm/gui/preferences/DrawingPreference.java
41 41 private JTextField drawRawGpsMaxLineLengthLocal = new JTextField(8); 42 42 private JCheckBox forceRawGpsLines = new JCheckBox(tr("Force lines if no segments imported.")); 43 43 private JCheckBox largeGpsPoints = new JCheckBox(tr("Draw large GPS points.")); 44 private JCheckBox hdopCircleGpsPoints = new JCheckBox(tr("Draw a circle form HDOP value.")); 44 45 private ButtonGroup colorGroup; 45 46 private JRadioButton colorTypeVelocity = new JRadioButton(tr("Velocity (red = slow, green = fast)")); 46 47 private JRadioButton colorTypeDilution = new JRadioButton(tr("Dilution of Position (red = high, green = low, if available)")); … … 143 144 panel.add(new JLabel(tr("Minimum distance (pixels)")), GBC.std().insets(60,0,0,0)); 144 145 panel.add(drawGpsArrowsMinDist, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5)); 145 146 147 // hdopCircleGpsPoints 148 hdopCircleGpsPoints.setSelected(Main.pref.getBoolean("draw.rawgps.hdopcircle", true)); 149 hdopCircleGpsPoints.setToolTipText(tr("Draw a circle form HDOP value.")); 150 panel.add(hdopCircleGpsPoints, GBC.eop().insets(20,0,0,0)); 151 146 152 // largeGpsPoints 147 153 largeGpsPoints.setSelected(Main.pref.getBoolean("draw.rawgps.large", false)); 148 154 largeGpsPoints.setToolTipText(tr("Draw larger dots for the GPS points.")); … … 275 281 Main.pref.putInteger("draw.rawgps.colors", 0); 276 282 int ccti=colorTypeVelocityTune.getSelectedIndex(); 277 283 Main.pref.putInteger("draw.rawgps.colorTracksTune", ccti==2 ? 10 : (ccti==1 ? 20 : 45)); 284 Main.pref.put("draw.rawgps.hdopcircle", hdopCircleGpsPoints.isSelected()); 278 285 Main.pref.put("draw.rawgps.large", largeGpsPoints.isSelected()); 279 286 Main.pref.put("draw.segment.direction", directionHint.isSelected()); 280 287 Main.pref.put("draw.segment.relevant_directions_only", interestingDirections.isSelected());
