Changeset 11289 in josm


Ignore:
Timestamp:
2016-11-21T23:05:39+01:00 (3 years ago)
Author:
wiktorn
Message:

Use explicit ImageryTypes when adding layers

Closes: #14017

Location:
trunk/src/org/openstreetmap/josm/gui/preferences/imagery
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java

    r8568 r11289  
    7878    @Override
    7979    public ImageryInfo getImageryInfo() {
    80         return new ImageryInfo(getImageryName(), getTmsUrl());
     80        ImageryInfo ret = new ImageryInfo(getImageryName(), getTmsUrl());
     81        ret.setImageryType(ImageryType.TMS);
     82        return ret;
     83
    8184    }
    8285
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java

    r11017 r11289  
    1919import org.openstreetmap.josm.Main;
    2020import org.openstreetmap.josm.data.imagery.ImageryInfo;
     21import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
    2122import org.openstreetmap.josm.gui.bbox.SlippyMapBBoxChooser;
    2223import org.openstreetmap.josm.gui.util.GuiHelper;
     
    155156            info = wms.toImageryInfo(getImageryName(), tree.getSelectedLayers());
    156157            info.setUrl(getWmsUrl());
     158            info.setImageryType(ImageryType.WMS);
    157159        }
    158160        return info;
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanel.java

    r9682 r11289  
    3636    protected ImageryInfo getImageryInfo() {
    3737        ImageryInfo ret = new ImageryInfo(getImageryName(), "wmts:" + sanitize(getImageryRawUrl(), ImageryType.WMTS));
     38        ret.setImageryType(ImageryType.WMTS);
    3839        try {
    3940            new WMTSTileSource(ret); // check if constructor throws an error
Note: See TracChangeset for help on using the changeset viewer.