Changeset 9888 in josm


Ignore:
Timestamp:
2016-02-27T16:43:05+01:00 (4 years ago)
Author:
wiktorn
Message:

Properly handle situation, when Style tag doesn't contain Identifier.

See: #12573

File:
1 edited

Legend:

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

    r9887 r9888  
    385385                        layer.baseUrl = reader.getAttributeValue("", "template");
    386386                    } else if (new QName(WMTS_NS_URL, "Style").equals(reader.getName()) &&
    387                             "true".equals(reader.getAttributeValue("", "isDefault")) &&
    388                             moveReaderToTag(reader, new QName[] {new QName(OWS_NS_URL, "Identifier")})) {
    389                         layer.style = reader.getElementText();
     387                            "true".equals(reader.getAttributeValue("", "isDefault"))) {
    390388                        tagStack.push(reader.getName()); // keep tagStack in sync
     389                        if (moveReaderToTag(reader, new QName[] {new QName(OWS_NS_URL, "Identifier")})) {
     390                            layer.style = reader.getElementText();
     391                        }
    391392                    } else if (new QName(WMTS_NS_URL, "TileMatrixSetLink").equals(reader.getName())) {
    392393                        layer.tileMatrixSetLinks.add(praseTileMatrixSetLink(reader));
Note: See TracChangeset for help on using the changeset viewer.