Changeset 17657 in josm


Ignore:
Timestamp:
2021-03-24T19:52:46+01:00 (3 years ago)
Author:
wiktorn
Message:

Allow adding WMS imageries by URL.

Add support for special case, where user wants to provide the URL of WMS imgary
by hand. In this case, only URL and name is required.

See: #20565

File:
1 edited

Legend:

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

    r17552 r17657  
    207207            return false;
    208208        }
     209        if (!endpoint.isSelected() && !getWmsUrl().isEmpty()) {
     210            // if endpoint is not selected and imagery name and WMS URL is provided, allow adding imagery
     211            // this is to cover the cases, when the user constructs URL on hers/his own
     212            return true;
     213        }
    209214        /*
    210215         * We need selection of the layers in following situations:
    211216         * * endpoint is not selected (and we don't care about setDefault layers as it's disabled anyway)
    212          * * endpoint is selected and setDefultLayers is selected
     217         * * endpoint is selected and setDefaultLayers is selected
    213218         */
    214219        if ((!endpoint.isSelected() || setDefaultLayers.isSelected()) && (tree == null || tree.getSelectedLayers().isEmpty())) {
Note: See TracChangeset for help on using the changeset viewer.