Beispiel #1
0
 public void setTileSource(TileSource tileSource) {
   if (tileSource.getMaxZoom() > MAX_ZOOM)
     throw new RuntimeException("Maximum zoom level too high");
   if (tileSource.getMinZoom() < MIN_ZOOM)
     throw new RuntimeException("Minumim zoom level too low");
   tileController.setTileSource(tileSource);
   zoomSlider.setMinimum(tileSource.getMinZoom());
   zoomSlider.setMaximum(tileSource.getMaxZoom());
   tileController.cancelOutstandingJobs();
   if (zoom > tileSource.getMaxZoom()) setZoom(tileSource.getMaxZoom());
   repaint();
 }
Beispiel #2
0
 public void setZoom(int zoom) {
   setZoom(zoom, new Point(getWidth() / 2, getHeight() / 2));
 }
Beispiel #3
0
 /** Decreases the current zoom level by one */
 public void zoomOut(Point mapPoint) {
   setZoom(zoom - 1, mapPoint);
 }
Beispiel #4
0
 /** Decreases the current zoom level by one */
 public void zoomOut() {
   setZoom(zoom - 1);
 }
Beispiel #5
0
 /** Increases the current zoom level by one */
 public void zoomIn(Point mapPoint) {
   setZoom(zoom + 1, mapPoint);
 }
Beispiel #6
0
 /** Increases the current zoom level by one */
 public void zoomIn() {
   setZoom(zoom + 1);
 }