Changeset 35329 in osm for applications/viewer/jmapviewer
- Timestamp:
- 2020-02-17T15:07:01+01:00 (5 years ago)
- Location:
- applications/viewer/jmapviewer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
r35056 r35329 51 51 public static final String API_KEY_SETTING = "jmapviewer.bing.api-key"; 52 52 /** Placeholder to specify Bing API key in metadata API URL*/ 53 public static final String API_KEY_PLACEHOLDER = "{api Key}";53 public static final String API_KEY_PLACEHOLDER = "{apikey}"; 54 54 55 55 /** Bing Metadata API URL */ -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java
r35322 r35329 28 28 * {!y} - substituted with Yahoo Y tile number 29 29 * {-y} - substituted with reversed Y tile number 30 * {api Key} - substituted with API key retrieved for the imagery id30 * {apikey} - substituted with API key retrieved for the imagery id 31 31 * {switch:VAL_A,VAL_B,VAL_C,...} - substituted with one of VAL_A, VAL_B, VAL_C. Usually 32 32 * used to specify many tile servers … … 50 50 private static final Pattern PATTERN_SWITCH = Pattern.compile("\\{switch:([^}]+)\\}"); 51 51 private static final Pattern PATTERN_HEADER = Pattern.compile("\\{header\\(([^,]+),([^}]+)\\)\\}"); 52 private static final Pattern PATTERN_API_KEY = Pattern.compile("\\{api Key\\}");52 private static final Pattern PATTERN_API_KEY = Pattern.compile("\\{apikey\\}"); 53 53 private static final Pattern PATTERN_PARAM = Pattern.compile("\\{((?:\\d+-)?z(?:oom)?(:?[+-]\\d+)?|x|y|!y|-y|switch:([^}]+))\\}"); 54 54 -
applications/viewer/jmapviewer/test/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSourceTest.java
r35320 r35329 111 111 public void testGetTileUrl_apiKey() { 112 112 System.setProperty("id1.api-key", "wololo"); 113 TileSourceInfo testImageryTMS = new TileSourceInfo("test imagery", "http://localhost/{zoom}/{x}/{y}?token={api Key}&foo=bar", "id1");113 TileSourceInfo testImageryTMS = new TileSourceInfo("test imagery", "http://localhost/{zoom}/{x}/{y}?token={apikey}&foo=bar", "id1"); 114 114 TemplatedTMSTileSource ts = new TemplatedTMSTileSource(testImageryTMS); 115 115 assertEquals("http://localhost/1/2/3?token=wololo&foo=bar", ts.getTileUrl(1, 2, 3));
Note:
See TracChangeset
for help on using the changeset viewer.