001// License: GPL. For details, see Readme.txt file. 002package org.openstreetmap.gui.jmapviewer.tilesources; 003 004public class TMSTileSource extends AbstractTMSTileSource { 005 006 protected int maxZoom; 007 protected int minZoom; 008 009 public TMSTileSource(TileSourceInfo info) { 010 super(info); 011 minZoom = info.getMinZoom(); 012 maxZoom = info.getMaxZoom(); 013 } 014 015 @Override 016 public int getMinZoom() { 017 return (minZoom == 0) ? super.getMinZoom() : minZoom; 018 } 019 020 @Override 021 public int getMaxZoom() { 022 return (maxZoom == 0) ? super.getMaxZoom() : maxZoom; 023 } 024}