Changeset 9864 in josm


Ignore:
Timestamp:
2016-02-23T21:42:07+01:00 (9 years ago)
Author:
wiktorn
Message:

Add WKID (Well Known ID) pattern to WMS url templates.

Patch by: slodki

Closes: #11687

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSource.java

    r9617 r9864  
    4848    private static final Pattern PATTERN_HEADER  = Pattern.compile("\\{header\\(([^,]+),([^}]+)\\)\\}");
    4949    private static final Pattern PATTERN_PROJ    = Pattern.compile("\\{proj\\}");
     50    private static final Pattern PATTERN_WKID    = Pattern.compile("\\{wkid\\}");
    5051    private static final Pattern PATTERN_BBOX    = Pattern.compile("\\{bbox\\}");
    5152    private static final Pattern PATTERN_W       = Pattern.compile("\\{w\\}");
     
    6061
    6162    private static final Pattern[] ALL_PATTERNS = {
    62         PATTERN_HEADER, PATTERN_PROJ, PATTERN_BBOX, PATTERN_W, PATTERN_S, PATTERN_E, PATTERN_N, PATTERN_WIDTH, PATTERN_HEIGHT
     63        PATTERN_HEADER, PATTERN_PROJ, PATTERN_WKID, PATTERN_BBOX, PATTERN_W, PATTERN_S, PATTERN_E, PATTERN_N, PATTERN_WIDTH, PATTERN_HEIGHT
    6364    };
    6465
     
    200201                replacement = myProjCode;
    201202                break;
     203            case "wkid":
     204                replacement = myProjCode.startsWith("EPSG:") ? myProjCode.substring(5) : myProjCode;
     205                break;
    202206            case "bbox":
    203207                replacement = bbox;
Note: See TracChangeset for help on using the changeset viewer.