示例#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();
 }
示例#2
0
 public void setZoom(int zoom) {
   setZoom(zoom, new Point(getWidth() / 2, getHeight() / 2));
 }
示例#3
0
 /** Decreases the current zoom level by one */
 public void zoomOut(Point mapPoint) {
   setZoom(zoom - 1, mapPoint);
 }
示例#4
0
 /** Decreases the current zoom level by one */
 public void zoomOut() {
   setZoom(zoom - 1);
 }
示例#5
0
 /** Increases the current zoom level by one */
 public void zoomIn(Point mapPoint) {
   setZoom(zoom + 1, mapPoint);
 }
示例#6
0
 /** Increases the current zoom level by one */
 public void zoomIn() {
   setZoom(zoom + 1);
 }