001 /** 002 * 003 */ 004 package org.openstreetmap.gui.jmapviewer.tilesources; 005 006 import java.awt.Image; 007 import java.io.IOException; 008 009 import javax.swing.ImageIcon; 010 011 import org.openstreetmap.gui.jmapviewer.Coordinate; 012 import org.openstreetmap.gui.jmapviewer.interfaces.TileSource; 013 014 public abstract class AbstractOsmTileSource extends AbstractTMSTileSource { 015 public AbstractOsmTileSource(String name, String base_url) { 016 super(name, base_url); 017 } 018 019 public int getMaxZoom() { 020 return 18; 021 } 022 023 @Override 024 public boolean requiresAttribution() { 025 return true; 026 } 027 028 @Override 029 public String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight) { 030 return "\u00a9 OpenStreetMap contributors, CC-BY-SA "; 031 } 032 033 @Override 034 public String getAttributionLinkURL() { 035 return "http://openstreetmap.org/"; 036 } 037 038 @Override 039 public Image getAttributionImage() { 040 return null; 041 } 042 043 @Override 044 public String getAttributionImageURL() { 045 return null; 046 } 047 048 @Override 049 public String getTermsOfUseText() { 050 return null; 051 } 052 053 @Override 054 public String getTermsOfUseURL() { 055 return "http://www.openstreetmap.org/copyright"; 056 } 057 }