- Timestamp:
- 2016-01-29T23:47:45+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanel.java
r8624 r9682 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.io.IOException; 7 6 8 import javax.swing.JLabel; 7 9 8 10 import org.openstreetmap.josm.data.imagery.ImageryInfo; 9 11 import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType; 12 import org.openstreetmap.josm.data.imagery.WMTSTileSource; 10 13 import org.openstreetmap.josm.tools.GBC; 11 14 … … 32 35 @Override 33 36 protected ImageryInfo getImageryInfo() { 34 return new ImageryInfo(getImageryName(), "wmts:" + sanitize(getImageryRawUrl(), ImageryType.WMTS)); 37 ImageryInfo ret = new ImageryInfo(getImageryName(), "wmts:" + sanitize(getImageryRawUrl(), ImageryType.WMTS)); 38 try { 39 new WMTSTileSource(ret); // check if constructor throws an error 40 } catch (IOException e) { 41 throw new IllegalArgumentException(e); // if so, wrap exception, so proper message will be shown to the user 42 } 43 return ret; 44 35 45 } 36 46
Note:
See TracChangeset
for help on using the changeset viewer.