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