Announcement

Collapse
No announcement yet.

Web WorldWind.WmtsCapabilities does not parse MaxTileCol

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Web WorldWind.WmtsCapabilities does not parse MaxTileCol

    Web WorldWind.WmtsCapabilities does not parse Layer/TileMatrixSetLink/TileMatrixSetLimits/TileMatrixLimits/MaxTileCol from the WMTS GetCapabilities response. The bug is probably caused by "maxTileCol" instead of "MaxTileCol" in the following code from https://files.worldwind.arc.nasa.gov...n.js:formatted

    n.assembleTileMatrixLimits = function(t) {
    for (var e = {}, i = t.children || t.childNodes, r = 0; r < i.length; r++) {
    var n = i[r];
    "TileMatrix" === n.localName ? e.tileMatrix = n.textContent : "MinTileRow" === n.localName ? e.minTileRow = parseInt(n.textContent) : "MaxTileRow" === n.localName ? e.maxTileRow = parseInt(n.textContent) : "MinTileCol" === n.localName ? e.minTileCol = parseInt(n.textContent) : "maxTileCol" === n.localName && (e.maxTileCol = parseInt(n.textContent))
    }
    return e
    }

    Steps to reproduce the behavior:
    1. Fetch a WMTS GetCapabilities URL that contains TileMatrixLimits nodes with MaxTileCol.
    2. Turn the XML text into a document object:
    var domparser = new DOMParser();
    var xml_doc = domparser.parseFromString(text, "text/xml");
    3. Use WorldWind.WmtsCapabilities to parse the XML document object.
    var capabilities = new WorldWind.WmtsCapabilities(xml_doc);
    4. All maxTileCol will be missing from all objects in all tileMatrixLimits arrays.

    maxTileRow, minTileCol, minTileRow, and tileMatrix will be present and set.

    Expected behavior
    maxTileCol should be present and set so it can be used to limit the GetTile requests to only those tiles that the WMTS server says are available.
Working...
X