- Timestamp:
- 2019-10-13T22:10:29+02:00 (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r15030 r15456 150 150 /** maximum zoom level supported */ 151 151 public static final int MAX_ZOOM = 30; 152 /** mini um zoom level supported */152 /** minimum zoom level supported */ 153 153 public static final int MIN_ZOOM = 2; 154 154 private static final Font InfoFont = new Font("sansserif", Font.BOLD, 13); -
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r12620 r15456 7 7 8 8 import org.apache.commons.jcs.access.CacheAccess; 9 import org.openstreetmap.gui.jmapviewer.JMapViewer; 9 10 import org.openstreetmap.gui.jmapviewer.OsmMercator; 10 11 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader; … … 12 13 import org.openstreetmap.gui.jmapviewer.tilesources.ScanexTileSource; 13 14 import org.openstreetmap.gui.jmapviewer.tilesources.TMSTileSource; 14 import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource;15 15 import org.openstreetmap.josm.data.cache.BufferedImageCacheEntry; 16 16 import org.openstreetmap.josm.data.imagery.CachedAttributionBingAerialTileSource; 17 17 import org.openstreetmap.josm.data.imagery.ImageryInfo; 18 18 import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType; 19 import org.openstreetmap.josm.data.imagery.JosmTemplatedTMSTileSource; 19 20 import org.openstreetmap.josm.data.imagery.TMSCachedTileLoader; 20 21 import org.openstreetmap.josm.data.preferences.BooleanProperty; … … 45 46 public static final BooleanProperty PROP_ADD_TO_SLIPPYMAP_CHOOSER = new BooleanProperty(PREFERENCE_PREFIX + ".add_to_slippymap_chooser", 46 47 true); 48 /** override minimum/maximum zoom level with those supported by JMapViewer, as these might be used in slippymap chooser */ 49 public static final int MAX_ZOOM = JMapViewer.MAX_ZOOM; 50 public static final int MIN_ZOOM = JMapViewer.MIN_ZOOM; 47 51 48 52 private static final ScaleList nativeScaleList = initNativeScaleList(); … … 112 116 public static TMSTileSource getTileSourceStatic(ImageryInfo info, Runnable attributionLoadedTask) { 113 117 if (info.getImageryType() == ImageryType.TMS) { 114 TemplatedTMSTileSource.checkUrl(info.getUrl());115 TMSTileSource t = new TemplatedTMSTileSource(info);118 JosmTemplatedTMSTileSource.checkUrl(info.getUrl()); 119 TMSTileSource t = new JosmTemplatedTMSTileSource(info); 116 120 info.setAttribution(t); 117 121 return t; -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/TMSSettingsPanel.java
r10568 r15456 16 16 import org.openstreetmap.josm.gui.layer.imagery.TileSourceDisplaySettings; 17 17 import org.openstreetmap.josm.tools.GBC; 18 import org.openstreetmap.josm.tools.Utils; 18 19 19 20 /** … … 40 41 super(new GridBagLayout()); 41 42 minZoomLvl = new JSpinner(new SpinnerNumberModel( 42 TMSLayer.PROP_MIN_ZOOM_LVL.get().intValue(), TMSLayer.MIN_ZOOM, TMSLayer.MAX_ZOOM, 1)); 43 Utils.clamp(TMSLayer.PROP_MIN_ZOOM_LVL.get().intValue(), TMSLayer.MIN_ZOOM, TMSLayer.MAX_ZOOM), 44 TMSLayer.MIN_ZOOM, 45 TMSLayer.MAX_ZOOM, 1)); 43 46 maxZoomLvl = new JSpinner(new SpinnerNumberModel( 44 TMSLayer.PROP_MAX_ZOOM_LVL.get().intValue(), TMSLayer.MIN_ZOOM, TMSLayer.MAX_ZOOM, 1)); 47 Utils.clamp(TMSLayer.PROP_MAX_ZOOM_LVL.get().intValue(), TMSLayer.MIN_ZOOM, TMSLayer.MAX_ZOOM), 48 TMSLayer.MIN_ZOOM, 49 TMSLayer.MAX_ZOOM, 1)); 45 50 maxConcurrentDownloads = new JSpinner(new SpinnerNumberModel( 46 51 TMSCachedTileLoader.THREAD_LIMIT.get().intValue(), 0, Integer.MAX_VALUE, 1)); -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java
r15095 r15456 36 36 import org.openstreetmap.gui.jmapviewer.tilesources.BingAerialTileSource; 37 37 import org.openstreetmap.gui.jmapviewer.tilesources.ScanexTileSource; 38 import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource;39 38 import org.openstreetmap.josm.TestUtils; 40 39 import org.openstreetmap.josm.actions.AddImageryLayerAction; … … 47 46 import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType; 48 47 import org.openstreetmap.josm.data.imagery.ImageryLayerInfo; 48 import org.openstreetmap.josm.data.imagery.JosmTemplatedTMSTileSource; 49 49 import org.openstreetmap.josm.data.imagery.LayerDetails; 50 50 import org.openstreetmap.josm.data.imagery.Shape; … … 366 366 return new ScanexTileSource(info); 367 367 case TMS: 368 return new TemplatedTMSTileSource(info);368 return new JosmTemplatedTMSTileSource(info); 369 369 case WMS_ENDPOINT: 370 370 info = convertWmsEndpointToWms(info); // fall-through
Note:
See TracChangeset
for help on using the changeset viewer.