Changeset 9946 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-03-07T19:10:03+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r9914 r9946 203 203 if (nativeScaleLayer != null) { 204 204 ScaleList scaleList = nativeScaleLayer.getNativeScales(); 205 if (PROP_ZOOM_INTERMEDIATE_STEPS.get()) { 206 scaleList = scaleList.withIntermediateSteps(PROP_ZOOM_RATIO.get()); 207 } 208 Scale s = scaleList.scaleZoomTimes(getScale(), PROP_ZOOM_RATIO.get(), times); 209 return s != null ? s.getScale() : 0; 210 } else { 211 return getScale() * Math.pow(PROP_ZOOM_RATIO.get(), times); 212 } 205 if (scaleList != null) { 206 if ( PROP_ZOOM_INTERMEDIATE_STEPS.get()) { 207 scaleList = scaleList.withIntermediateSteps(PROP_ZOOM_RATIO.get()); 208 } 209 Scale s = scaleList.scaleZoomTimes(getScale(), PROP_ZOOM_RATIO.get(), times); 210 return s != null ? s.getScale() : 0; 211 } 212 } 213 return getScale() * Math.pow(PROP_ZOOM_RATIO.get(), times); 213 214 } 214 215 … … 244 245 if (nativeScaleLayer != null) { 245 246 ScaleList scaleList = nativeScaleLayer.getNativeScales(); 246 Scale snapscale = scaleList.getSnapScale(scale, PROP_ZOOM_RATIO.get(), floor); 247 return snapscale != null ? snapscale.getScale() : scale; 248 } else { 249 return scale; 250 } 247 if (scaleList != null) { 248 Scale snapscale = scaleList.getSnapScale(scale, PROP_ZOOM_RATIO.get(), floor); 249 return snapscale != null ? snapscale.getScale() : scale; 250 } 251 } 252 return scale; 251 253 } 252 254 -
trunk/src/org/openstreetmap/josm/gui/layer/WMTSLayer.java
r9914 r9946 62 62 if (!Main.isDisplayingMapView()) 63 63 return 0; 64 Scale snap = getNativeScales().getSnapScale(Main.map.mapView.getScale(), false); 64 ScaleList scaleList = getNativeScales(); 65 Scale snap = null; 66 if (scaleList == null) { 67 return getMaxZoomLvl(); 68 } 69 snap = scaleList.getSnapScale(Main.map.mapView.getScale(), false); 65 70 return Math.max( 66 71 getMinZoomLvl(),
Note:
See TracChangeset
for help on using the changeset viewer.