Changeset 28553 in osm for applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
- Timestamp:
- 2012-08-15T22:52:04+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
r27519 r28553 2 2 3 3 //License: GPL. 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 4 6 5 7 import java.awt.Image; … … 36 38 37 39 public class BingAerialTileSource extends AbstractTMSTileSource { 40 38 41 private static String API_KEY = "Arzdiw4nlOJzRwOz__qailc8NiR31Tt51dN2D7cm57NrnceZnCpgOkmJhNpGoppU"; 39 42 private static volatile Future<List<Attribution>> attributions; // volatile is required for getAttribution(), see below. … … 61 64 public String getTileUrl(int zoom, int tilex, int tiley) throws IOException { 62 65 // make sure that attribution is loaded. otherwise subdomains is null. 63 getAttribution(); 66 if (getAttribution() == null) 67 throw new IOException(tr("Attribution is not loaded yet")); 64 68 65 69 int t = (zoom + tilex + tiley) % subdomains.length; … … 240 244 try { 241 245 final List<Attribution> data = getAttribution(); 242 if (data == null) {246 if (data == null) 243 247 return "Error loading Bing attribution data"; 244 }245 248 StringBuilder a = new StringBuilder(); 246 249 for (Attribution attr : data) {
Note:
See TracChangeset
for help on using the changeset viewer.