Changeset 5898 in josm
- Timestamp:
- 2013-04-21T16:27:21+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
r5779 r5898 11 11 import java.awt.Point; 12 12 import java.awt.Rectangle; 13 import java.io.File;14 13 import java.io.IOException; 15 14 import java.util.ArrayList; … … 27 26 import org.openstreetmap.gui.jmapviewer.MapMarkerDot; 28 27 import org.openstreetmap.gui.jmapviewer.MemoryTileCache; 29 import org.openstreetmap.gui.jmapviewer.OsmFileCacheTileLoader;30 28 import org.openstreetmap.gui.jmapviewer.OsmMercator; 31 29 import org.openstreetmap.gui.jmapviewer.OsmTileLoader; 32 30 import org.openstreetmap.gui.jmapviewer.interfaces.MapMarker; 33 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader;34 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener;35 31 import org.openstreetmap.gui.jmapviewer.interfaces.TileSource; 36 32 import org.openstreetmap.gui.jmapviewer.tilesources.MapQuestOpenAerialTileSource; … … 39 35 import org.openstreetmap.josm.Main; 40 36 import org.openstreetmap.josm.data.Bounds; 37 import org.openstreetmap.josm.data.Version; 41 38 import org.openstreetmap.josm.data.coor.LatLon; 42 39 import org.openstreetmap.josm.data.imagery.ImageryInfo; … … 171 168 public static final String RESIZE_PROP = SlippyMapBBoxChooser.class.getName() + ".resize"; 172 169 173 private TileLoader cachedLoader;174 private TileLoader uncachedLoader;170 private OsmTileLoader cachedLoader; 171 private OsmTileLoader uncachedLoader; 175 172 176 173 private final SizeButton iSizeButton = new SizeButton(); … … 189 186 190 187 uncachedLoader = new OsmTileLoader(this); 188 uncachedLoader.headers.put("User-Agent", Version.getInstance().getFullAgentString()); 191 189 setZoomContolsVisible(Main.pref.getBoolean("slippy_map_chooser.zoomcontrols",false)); 192 190 setMapMarkerVisible(false); -
trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
r5886 r5898 42 42 import org.openstreetmap.gui.jmapviewer.MapMarkerDot; 43 43 import org.openstreetmap.gui.jmapviewer.OsmMercator; 44 import org.openstreetmap.gui.jmapviewer.OsmTileLoader; 44 45 import org.openstreetmap.gui.jmapviewer.interfaces.MapMarker; 46 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader; 45 47 import org.openstreetmap.josm.data.Bounds; 48 import org.openstreetmap.josm.data.Version; 46 49 import org.openstreetmap.josm.data.coor.LatLon; 47 50 import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator; … … 120 123 } 121 124 125 /** 126 * Constructs a new {@code TileSelectionBBoxChooser}. 127 */ 122 128 public TileSelectionBBoxChooser() { 123 129 build(); … … 655 661 public TileBoundsMapView() { 656 662 setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY)); 663 TileLoader loader = tileController.getTileLoader(); 664 if (loader instanceof OsmTileLoader) { 665 ((OsmTileLoader)loader).headers.put("User-Agent", Version.getInstance().getFullAgentString()); 666 } 657 667 } 658 668 -
trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java
r4336 r5898 6 6 7 7 import java.awt.Dimension; 8 import java.awt.Graphics;9 8 import java.awt.Toolkit; 10 11 9 import java.beans.PropertyChangeEvent; 12 10 import java.beans.PropertyChangeListener; -
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r5874 r5898 57 57 import org.openstreetmap.josm.actions.RenameLayerAction; 58 58 import org.openstreetmap.josm.data.Bounds; 59 import org.openstreetmap.josm.data.Version; 59 60 import org.openstreetmap.josm.data.coor.EastNorth; 60 61 import org.openstreetmap.josm.data.coor.LatLon; … … 133 134 if (cachePath != null && !cachePath.isEmpty()) { 134 135 try { 135 return new OsmFileCacheTileLoader(listener, new File(cachePath)); 136 OsmFileCacheTileLoader loader = new OsmFileCacheTileLoader(listener, new File(cachePath)); 137 loader.headers.put("User-Agent", Version.getInstance().getFullAgentString()); 138 return loader; 136 139 } catch (IOException e) { 137 140 } … … 418 421 } 419 422 } 423 tileLoader.headers.put("User-Agent", Version.getInstance().getFullAgentString()); 420 424 } 421 425
Note:
See TracChangeset
for help on using the changeset viewer.