Ticket #5911: JMapViewer_attribution.patch
File JMapViewer_attribution.patch, 4.0 KB (added by , 13 years ago) |
---|
-
src/org/openstreetmap/gui/jmapviewer/BingAerialTileSource.java
160 160 @Override 161 161 public Image getAttributionImage() { 162 162 try { 163 return ImageIO.read(getClass().getResourceAsStream(" /images/bing_maps.png"));163 return ImageIO.read(getClass().getResourceAsStream("images/bing_maps.png")); 164 164 } catch (IOException e) { 165 165 return null; 166 166 } -
src/org/openstreetmap/gui/jmapviewer/Demo.java
54 54 map.setDisplayToFitMapMarkers(); 55 55 } 56 56 }); 57 JComboBox tileSourceSelector = new JComboBox(new TileSource[] { new OsmTileSource.Mapnik(), 58 new OsmTileSource.TilesAtHome(), new OsmTileSource.CycleMap() }); 57 JComboBox tileSourceSelector = new JComboBox(new TileSource[] { 58 new OsmTileSource.Mapnik(), 59 new OsmTileSource.TilesAtHome(), 60 new OsmTileSource.CycleMap(), 61 new BingAerialTileSource() }); 59 62 tileSourceSelector.addItemListener(new ItemListener() { 60 63 public void itemStateChanged(ItemEvent e) { 61 64 map.setTileSource((TileSource) e.getItem()); -
build.xml
27 27 <delete file="JMapViewer.jar" /> 28 28 <delete file="JMapViewer_src.jar" /> 29 29 <jar destfile="JMapViewer.jar" filesetmanifest="mergewithoutmain"> 30 <fileset dir="bin" includes="**/jmapviewer/**"> 31 </fileset> 30 <fileset dir="bin" includes="**/jmapviewer/**" /> 32 31 <fileset dir="src" includes="**/jmapviewer/**" /> 33 32 </jar> 34 33 <jar destfile="JMapViewer_src.jar" filesetmanifest="mergewithoutmain"> … … 45 44 <attribute name="Class-Path" value="." /> 46 45 </manifest> 47 46 <fileset dir="bin" includes="**/jmapviewer/**" /> 48 47 <fileset dir="src" includes="**/jmapviewer/**/*.java" /> 49 48 </jar> 50 49 </target> 51 50 </project> -
src/org/openstreetmap/gui/jmapviewer/OsmTileSource.java
27 27 NAME = name; 28 28 BASE_URL = base_url; 29 29 ATTR_IMG_URL = attr_img_url; 30 if(ATTR_IMG_URL == null) { 31 REQUIRES_ATTRIBUTION = false; 32 } 33 } 30 } 34 31 35 32 public String getName() { 36 33 return NAME; … … 88 85 } 89 86 90 87 public String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight) { 91 return " CC-BY-SA OpenStreetMap and Contributors";88 return "© OpenStreetMap contributors, CC-BY-SA "; 92 89 } 93 90 94 91 public String getAttributionLinkURL() { … … 96 93 } 97 94 98 95 public String getTermsOfUseURL() { 99 return "http:// openstreetmap.org/";96 return "http://www.openstreetmap.org/copyright"; 100 97 } 101 98 102 99 public double latToTileY(double lat, int zoom) { … … 182 179 return TileUpdate.IfModifiedSince; 183 180 } 184 181 } 182 185 183 public static class TilesAtHome extends OsmaSource { 186 184 public TilesAtHome() { 187 185 super("TilesAtHome", "tile"); 188 186 } 189 187 } 188 190 189 public static class Maplint extends OsmaSource { 191 190 public Maplint() { 192 191 super("Maplint", "maplint");