Ticket #4480: jmapviewer.patch
| File jmapviewer.patch, 1.3 KB (added by , 16 years ago) |
|---|
-
src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
493 493 494 494 if (mapMarkersVisible && mapMarkerList != null) { 495 495 for (MapMarker marker : mapMarkerList) { 496 Point p = getMapPosition(marker.getLat(), marker.getLon()); 497 if (p != null) { 498 marker.paint(g, p); 499 } 496 paintMarker(g, marker); 500 497 } 501 498 } 502 499 } 503 500 504 501 /** 502 * Paint a single marker. 503 */ 504 protected void paintMarker(Graphics g, MapMarker marker) { 505 Point p = getMapPosition(marker.getLat(), marker.getLon()); 506 if (p != null) { 507 marker.paint(g, p); 508 } 509 } 510 511 /** 505 512 * Moves the visible map pane. 506 513 * 507 514 * @param x … … 628 635 repaint(); 629 636 } 630 637 638 public void removeMapMarker(MapMarker marker) { 639 mapMarkerList.remove(marker); 640 repaint(); 641 } 642 631 643 public void addMapRectangle(MapRectangle rectangle) { 632 644 mapRectangleList.add(rectangle); 633 645 repaint();
