Changeset 35017 in osm for applications/viewer/jmapviewer/src
- Timestamp:
- 2019-05-30T15:32:13+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
r34766 r35017 43 43 public class BingAerialTileSource extends TMSTileSource { 44 44 45 /** Setting key for Bing metadata API URL. Must contain {@link #API_KEY_PLACEHOLDER} */ 46 public static final String METADATA_API_SETTING = "jmapviewer.bing.metadata-api-url"; 47 /** Setting key for Bing API key */ 48 public static final String API_KEY_SETTING = "jmapviewer.bing.api-key"; 49 /** Placeholder to specify Bing API key in metadata API URL*/ 50 public static final String API_KEY_PLACEHOLDER = "{apiKey}"; 51 52 /** Bing Metadata API URL */ 53 private static final String METADATA_API_URL = 54 "https://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?include=ImageryProviders&output=xml&key=" + API_KEY_PLACEHOLDER; 55 /** Original Bing API key created by Potlatch2 developers in 2010 */ 45 56 private static final String API_KEY = "Arzdiw4nlOJzRwOz__qailc8NiR31Tt51dN2D7cm57NrnceZnCpgOkmJhNpGoppU"; 46 57 private static volatile Future<List<Attribution>> attributions; // volatile is required for getAttribution(), see below. … … 95 106 96 107 protected URL getAttributionUrl() throws MalformedURLException { 97 return new URL( "https://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?include=ImageryProviders&output=xml&key="98 + API_KEY);108 return new URL(FeatureAdapter.getSetting(METADATA_API_SETTING, METADATA_API_URL) 109 .replace(API_KEY_PLACEHOLDER, FeatureAdapter.getSetting(API_KEY_SETTING, API_KEY))); 99 110 } 100 111
Note:
See TracChangeset
for help on using the changeset viewer.