001 package org.openstreetmap.gui.jmapviewer.tilesources; 002 003 //License: GPL. 004 005 import java.awt.Image; 006 007 import org.openstreetmap.gui.jmapviewer.Coordinate; 008 009 public class TMSTileSource extends AbstractTMSTileSource { 010 011 protected int maxZoom; 012 protected int minZoom = 0; 013 014 public TMSTileSource(String name, String url, int maxZoom) { 015 super(name, url); 016 this.maxZoom = maxZoom; 017 } 018 019 public TMSTileSource(String name, String url, int minZoom, int maxZoom) { 020 super(name, url); 021 this.minZoom = minZoom; 022 this.maxZoom = maxZoom; 023 } 024 025 @Override 026 public int getMinZoom() { 027 return (minZoom == 0) ? super.getMinZoom() : minZoom; 028 } 029 030 @Override 031 public int getMaxZoom() { 032 return (maxZoom == 0) ? super.getMaxZoom() : maxZoom; 033 } 034 035 public TileUpdate getTileUpdate() { 036 return TileUpdate.IfNoneMatch; 037 } 038 039 }