Changeset 16462 in osm for applications/editors/josm/plugins/slippymap/src
- Timestamp:
- 2009-07-12T20:31:35+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapLayer.java
r16461 r16462 519 519 } 520 520 521 inttilesSpanned() {521 double tilesSpanned() { 522 522 int x_span = z12x1 - z12x0; 523 523 int y_span = z12y1 - z12y0; 524 return x_span * y_span;524 return Math.sqrt(1.0 * x_span * y_span); 525 525 } 526 526 … … 585 585 int zoom = currentZoomLevel; 586 586 587 if (zoomDecreaseAllowed() && (ts.tilesSpanned() > (18*18))) {587 if (zoomDecreaseAllowed() && (ts.tilesSpanned() > 18)) { 588 588 this.debug("too many tiles, decreasing zoom from " + currentZoomLevel); 589 589 if (decreaseZoomLevel()) … … 591 591 return; 592 592 } 593 if (zoomIncreaseAllowed() && (ts.tilesSpanned() < =0)) {593 if (zoomIncreaseAllowed() && (ts.tilesSpanned() < 1.0)) { 594 594 this.debug("doesn't even cover one tile (" + ts.tilesSpanned() 595 595 + "), increasing zoom from " + currentZoomLevel);
Note:
See TracChangeset
for help on using the changeset viewer.