Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External report: Web WorldWind.WmtsCapabilities does not parse MaxTileCol #816

Open
markpet49 opened this issue Oct 21, 2019 · 0 comments
Open
Labels

Comments

@markpet49
Copy link
Member

Reported via e-mail.

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/artifactory/web/0.9.0/worldwind.min.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.

@markpet49 markpet49 added the bug label Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant