Changeset 8068 in josm for trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java
- Timestamp:
- 2015-02-15T19:55:12+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java
r8061 r8068 187 187 // Just set the URL and hope everything works out 188 188 if(s.wmsUrl.isEmpty()) { 189 addWMSLayer(s.name + " (" + text + ")", text); 190 break outer; 189 try { 190 addWMSLayer(s.name + " (" + text + ")", text); 191 break outer; 192 } catch (IllegalStateException ex) { 193 Main.error(ex.getMessage()); 194 } 191 195 } 192 196 … … 226 230 * @param title Name of the layer as it will shop up in the layer manager 227 231 * @param url URL to the WMS server 232 * @throws IllegalStateException if imagery time is neither HTML nor WMS 233 * @see WMSLayer#checkGrabberType 228 234 */ 229 235 private void addWMSLayer(String title, String url) { 230 Main.main.addLayer(new WMSLayer(new ImageryInfo(title, url))); 236 WMSLayer layer = new WMSLayer(new ImageryInfo(title, url)); 237 layer.checkGrabberType(); 238 Main.main.addLayer(layer); 231 239 } 232 240
Note:
See TracChangeset
for help on using the changeset viewer.