Changeset 11168 in josm for trunk/src/org
- Timestamp:
- 2016-10-26T14:02:13+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
r11167 r11168 30 30 import org.openstreetmap.josm.gui.ExtendedDialog; 31 31 import org.openstreetmap.josm.gui.layer.imagery.TileSourceDisplaySettings; 32 import org.openstreetmap.josm.tools.CheckParameterUtil; 32 33 33 34 /** … … 61 62 public WMSLayer(ImageryInfo info) { 62 63 super(info); 64 CheckParameterUtil.ensureThat(info.getImageryType() == ImageryType.WMS, "ImageryType is WMS"); 65 CheckParameterUtil.ensureParameterNotNull(info.getUrl(), "info.url"); 66 TemplatedWMSTileSource.checkUrl(info.getUrl()); 63 67 this.supportedProjections = new TreeSet<>(info.getServerProjections()); 64 68 } … … 82 86 @Override 83 87 protected AbstractWMSTileSource getTileSource() { 84 if (info.getImageryType() == ImageryType.WMS && info.getUrl() != null) { 85 TemplatedWMSTileSource.checkUrl(info.getUrl()); 86 AbstractWMSTileSource tileSource = new TemplatedWMSTileSource(info); 87 info.setAttribution(tileSource); 88 return tileSource; 89 } 90 return null; 88 AbstractWMSTileSource tileSource = new TemplatedWMSTileSource(info); 89 info.setAttribution(tileSource); 90 return tileSource; 91 91 } 92 92
Note:
See TracChangeset
for help on using the changeset viewer.