Changeset 1686 in josm
- Timestamp:
- 2009-06-21T18:29:16+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java
r1677 r1686 19 19 import javax.swing.JPanel; 20 20 21 import org.openstreetmap.gui.jmapviewer.Coordinate; 21 22 import org.openstreetmap.gui.jmapviewer.JMapViewer; 22 23 import org.openstreetmap.gui.jmapviewer.MapMarkerDot; … … 84 85 this.setTileSource(sources[2]); 85 86 } else { 86 if (!mapStyle.equals("mapnik")) 87 if (!mapStyle.equals("mapnik")) { 87 88 Main.pref.put("slippy_map_chooser.mapstyle", "mapnik"); 89 } 88 90 } 89 91 } … … 94 96 95 97 public void setFileCacheEnabled(boolean enabled) { 96 if (enabled) 98 if (enabled) { 97 99 setTileLoader(cachedLoader); 98 else100 } else { 99 101 setTileLoader(uncachedLoader); 102 } 100 103 } 101 104 … … 106 109 slipyyMapTabPanel.add(this, BorderLayout.CENTER); 107 110 String labelText = "<b>Zoom:</b> Mousewheel, double click or Ctrl + Up/Down " 108 111 + "<b>Move map:</b> Hold right mousebutton and move mouse or use cursor keys. <b>Select:</b> Click."; 109 112 slipyyMapTabPanel.add(new JLabel("<html>" + tr(labelText) + "</html>"), BorderLayout.SOUTH); 110 113 iGui.tabpane.add(slipyyMapTabPanel, tr("Slippy map")); … … 203 206 iSelectionRectEnd = pEnd; 204 207 205 Point2D.Double l1 = getPosition(p_max);206 Point2D.Double l2 = getPosition(p_min);207 iGui.minlat = Math.min(l2. x, l1.x);208 iGui.minlon = Math.min(l1. y, l2.y);209 iGui.maxlat = Math.max(l2. x, l1.x);210 iGui.maxlon = Math.max(l1. y, l2.y);208 Coordinate l1 = getPosition(p_max); 209 Coordinate l2 = getPosition(p_min); 210 iGui.minlat = Math.min(l2.getLon(), l1.getLon()); 211 iGui.minlon = Math.min(l1.getLat(), l2.getLat()); 212 iGui.maxlat = Math.max(l2.getLon(), l1.getLon()); 213 iGui.maxlon = Math.max(l1.getLat(), l2.getLat()); 211 214 212 215 iGui.boundingBoxChanged(this); … … 221 224 if (iScreenSize == null) { 222 225 Component c = iGui.getParent().getParent().getParent().getParent().getParent().getParent().getParent() 223 226 .getParent().getParent(); 224 227 // remember the initial set screen dimensions 225 228 iDownloadDialogDimension = c.getSize(); … … 230 233 // resize 231 234 Component co = iGui.getParent().getParent().getParent().getParent().getParent().getParent().getParent() 232 235 .getParent().getParent(); 233 236 Dimension currentDimension = co.getSize(); 234 237
Note:
See TracChangeset
for help on using the changeset viewer.