Changeset 35321 in osm for applications
- Timestamp:
- 2020-02-15T15:37:16+01:00 (5 years ago)
- Location:
- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/FeatureAdapter.java
r35320 r35321 42 42 * @param imageryId imagery id 43 43 * @return the API key for the given imagery id 44 */ 45 String retrieveApiKey(String imageryId); 44 * @throws IOException in case of I/O error 45 */ 46 String retrieveApiKey(String imageryId) throws IOException; 46 47 } 47 48 … … 191 192 * @param imageryId imagery id 192 193 * @return the API key for the given imagery id 193 */ 194 public static String retrieveApiKey(String imageryId) { 194 * @throws IOException in case of I/O error 195 */ 196 public static String retrieveApiKey(String imageryId) throws IOException { 195 197 return apiKeyAdapter.retrieveApiKey(imageryId); 196 198 } -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java
r35320 r35321 2 2 package org.openstreetmap.gui.jmapviewer.tilesources; 3 3 4 import java.io.IOException; 4 5 import java.util.HashMap; 5 6 import java.util.Map; … … 93 94 }); 94 95 // Capturing group pattern on API key values 95 replacePattern(PATTERN_API_KEY, (matcher, output) -> 96 matcher.appendReplacement(output, FeatureAdapter.retrieveApiKey(imageryId)) 97 ); 96 replacePattern(PATTERN_API_KEY, (matcher, output) -> { 97 try { 98 matcher.appendReplacement(output, FeatureAdapter.retrieveApiKey(imageryId)); 99 } catch (IOException e) { 100 throw new IllegalArgumentException(e); 101 } 102 }); 98 103 // Capturing group pattern on zoom values 99 104 m = PATTERN_ZOOM.matcher(baseUrl);
Note:
See TracChangeset
for help on using the changeset viewer.