Changeset 31434 in osm for applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
- Timestamp:
- 2015-08-02T17:09:43+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
r31432 r31434 39 39 public class BingAerialTileSource extends AbstractTMSTileSource { 40 40 41 private static String API_KEY = "Arzdiw4nlOJzRwOz__qailc8NiR31Tt51dN2D7cm57NrnceZnCpgOkmJhNpGoppU"; 41 private static final String API_KEY = "Arzdiw4nlOJzRwOz__qailc8NiR31Tt51dN2D7cm57NrnceZnCpgOkmJhNpGoppU"; 42 42 private static volatile Future<List<Attribution>> attributions; // volatile is required for getAttribution(), see below. 43 43 private static String imageUrlTemplate; … … 57 57 } 58 58 59 /** 60 * Constructs a new {@code BingAerialTileSource}. 61 */ 59 62 public BingAerialTileSource(TileSourceInfo info) { 60 63 super(info); … … 62 65 63 66 protected static class Attribution { 64 String attribution; 65 int minZoom; 66 int maxZoom; 67 Coordinate min; 68 Coordinate max; 67 private String attribution; 68 private int minZoom; 69 private int maxZoom; 70 private Coordinate min; 71 private Coordinate max; 69 72 } 70 73 … … 100 103 imageUrlTemplate = xpath.compile("//ImageryMetadata/ImageUrl/text()").evaluate(document); 101 104 imageUrlTemplate = culturePattern.matcher(imageUrlTemplate).replaceAll(Locale.getDefault().toString()); 102 imageryZoomMax = Integer. parseInt(xpath.compile("//ImageryMetadata/ZoomMax/text()").evaluate(document));105 imageryZoomMax = Integer.valueOf(xpath.compile("//ImageryMetadata/ZoomMax/text()").evaluate(document)); 103 106 104 107 NodeList subdomainTxt = (NodeList) xpath.compile("//ImageryMetadata/ImageUrlSubdomains/string/text()") … … 137 140 attr.minZoom = Integer.parseInt(zoomMinXpath.evaluate(areaNode)); 138 141 139 Double southLat = Double. parseDouble(southLatXpath.evaluate(areaNode));140 Double northLat = Double. parseDouble(northLatXpath.evaluate(areaNode));141 Double westLon = Double. parseDouble(westLonXpath.evaluate(areaNode));142 Double eastLon = Double. parseDouble(eastLonXpath.evaluate(areaNode));142 Double southLat = Double.valueOf(southLatXpath.evaluate(areaNode)); 143 Double northLat = Double.valueOf(northLatXpath.evaluate(areaNode)); 144 Double westLon = Double.valueOf(westLonXpath.evaluate(areaNode)); 145 Double eastLon = Double.valueOf(eastLonXpath.evaluate(areaNode)); 143 146 attr.min = new Coordinate(southLat, westLon); 144 147 attr.max = new Coordinate(northLat, eastLon); … … 281 284 && topLeft.getLat() > attr.min.getLat() && botRight.getLat() < attr.max.getLat()) { 282 285 a.append(attr.attribution); 283 a.append( " ");286 a.append(' '); 284 287 } 285 288 } … … 292 295 } 293 296 294 static String computeQuadTree(int zoom, int tilex, int tiley) { 297 private static String computeQuadTree(int zoom, int tilex, int tiley) { 295 298 StringBuilder k = new StringBuilder(); 296 299 for (int i = zoom; i > 0; i--) {
Note:
See TracChangeset
for help on using the changeset viewer.
