Skip to content

Commit

Permalink
Strict WMTS get capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Jun 13, 2017
1 parent a595c5f commit e0ab632
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Empty file modified bin/mbtiles-server.js
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions routes/wmts.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ function GetCapabilitiesKVP (req, res) {
const filepath = path.join(CACHE, layer + '.mbtiles')
const url = req.url

const {request} = getQuery(req)
const {request, version, service} = getQuery(req)
if (!fs.existsSync(filepath)) return mbtilesNotFound(url, layer, filepath, res)

const mbtiles = new MBTiles(filepath)
switch (request) {
case 'getcapabilities':
// if (version !== '1.0.0') return invalidVersion(url, layer, filepath, res)
// if (service !== 'wmts') return invalidService(url, layer, filepath, 'wmts', res)
if (version !== '1.0.0') return invalidVersion(url, layer, filepath, res)
if (service !== 'wmts') return invalidService(url, layer, filepath, 'wmts', res)
return mbtilesMedataToXML(mbtiles, layer, res)
case undefined:
return mbtilesMedataToXML(mbtiles, layer, res)
Expand Down

0 comments on commit e0ab632

Please sign in to comment.