Changeset 9623 in osm for applications/editors/josm/plugins/slippy_map_chooser/src/SlippyMapChooser.java
- Timestamp:
- 2008-08-10T20:09:05+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/slippy_map_chooser/src/SlippyMapChooser.java
r9537 r9623 19 19 import org.openstreetmap.gui.jmapviewer.JMapViewer; 20 20 import org.openstreetmap.gui.jmapviewer.MapMarkerDot; 21 import org.openstreetmap.gui.jmapviewer.MemoryTileCache; 21 22 import org.openstreetmap.gui.jmapviewer.OsmMercator; 23 import org.openstreetmap.gui.jmapviewer.OsmTileLoader; 22 24 import org.openstreetmap.gui.jmapviewer.interfaces.MapMarker; 23 25 import org.openstreetmap.josm.gui.download.DownloadDialog; … … 40 42 41 43 private SizeButton iSizeButton = new SizeButton(); 44 private SourceButton iSourceButton = new SourceButton(); 42 45 43 46 // standard dimension … … 66 69 iGui.tabpane.add(temp, tr("Slippy map")); 67 70 68 new OsmMapControl(this, temp, iSizeButton); 71 new OsmMapControl(this, temp, iSizeButton, iSourceButton); 69 72 boundingBoxChanged(gui); 70 73 } … … 103 106 104 107 iSizeButton.paint(g); 108 iSourceButton.paint(g); 105 109 } catch (Exception e) { 106 110 e.printStackTrace(); … … 199 203 int h = iScreenSize.height * 90 / 100; 200 204 co.setBounds((iScreenSize.width - w) / 2, (iScreenSize.height - h) / 2, w, h); 205 201 206 } 202 207 // shrink … … 207 212 int h = iDownloadDialogDimension.height; 208 213 co.setBounds((iScreenSize.width - w) / 2, (iScreenSize.height - h) / 2, w, h); 209 } 214 215 } 216 210 217 repaint(); 211 218 } 219 220 public void toggleMapSource(int mapSource){ 221 this.tileCache = new MemoryTileCache(); 222 if(mapSource == SourceButton.MAPNIK){ 223 this.tileLoader = new OsmTileLoader(this,OsmTileLoader.MAP_MAPNIK); 224 }else{ 225 this.tileLoader = new OsmTileLoader(this,OsmTileLoader.MAP_OSMA); 226 } 227 repaint(); 228 } 212 229 213 230 }
Note:
See TracChangeset
for help on using the changeset viewer.
