- Timestamp:
- 2009-09-12T18:22:41+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r2025 r2105 440 440 // paint large dots for points 441 441 boolean large = Main.pref.getBoolean("draw.rawgps.large"); 442 boolean hdopcircle = Main.pref.getBoolean("draw.rawgps.hdopcircle", true); 442 443 // color the lines 443 444 colorModes colored = colorModes.none; … … 632 633 } // end if lines 633 634 635 634 636 /**************************************************************** 635 ********** STEP 3d - DRAW LARGE POINTS *************************637 ********** STEP 3d - DRAW LARGE POINTS AND HDOP CIRCLE ********* 636 638 ****************************************************************/ 637 if (large ) {639 if (large || hdopcircle) { 638 640 g.setColor(neutralColor); 639 641 for (GpxTrack trk : data.tracks) { … … 646 648 Point screen = mv.getPoint(trkPnt.getEastNorth()); 647 649 g.setColor(trkPnt.customColoring); 648 g.fillRect(screen.x - 1, screen.y - 1, 3, 3); 650 if (hdopcircle && trkPnt.attr.get("hdop") != null) { 651 // hdop value 652 float hdop = ((Float)trkPnt.attr.get("hdop")).floatValue(); 653 if (hdop < 0) { 654 hdop = 0; 655 } 656 // hdop pixels 657 int hdopp = mv.getPoint(new LatLon(trkPnt.getCoor().lat(), trkPnt.getCoor().lon() + 2*6*hdop*360/40000000)).x - screen.x; 658 g.drawArc(screen.x-hdopp/2, screen.y-hdopp/2, hdopp, hdopp, 0, 360); 659 } 660 if (large) { 661 g.fillRect(screen.x-1, screen.y-1, 3, 3); 662 } 649 663 } // end for trkpnt 650 664 } // end for segment 651 665 } // end for trk 652 } // end if large 666 } // end if large || hdopcircle 653 667 654 668 /**************************************************************** -
trunk/src/org/openstreetmap/josm/gui/preferences/DrawingPreference.java
r1742 r2105 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)")); … … 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)); 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)); 145 151 146 152 // largeGpsPoints … … 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());
Note:
See TracChangeset
for help on using the changeset viewer.