Exemplo n.º 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();
 }
Exemplo n.º 2
0
 public static String getTileKey(TileSource source, int xtile, int ytile, int zoom) {
   return zoom + "/" + xtile + "/" + ytile + "@" + source.getName();
 }
Exemplo n.º 3
0
 public String getUrl() {
   return source.getTileUrl(zoom, xtile, ytile);
 }