diff --git a/Dockerfile b/Dockerfile index f5f005e..4ed65a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:6-stretch +FROM node:6.15.1-stretch MAINTAINER Petr Sloup ENV NODE_ENV="production" @@ -21,6 +21,7 @@ RUN apt-get -qq update \ libprotobuf-dev \ libxxf86vm-dev \ xvfb \ + x11-utils \ && apt-get clean RUN mkdir -p /usr/src/app diff --git a/Dockerfile_light b/Dockerfile_light index b3926ee..2c3c575 100644 --- a/Dockerfile_light +++ b/Dockerfile_light @@ -1,4 +1,4 @@ -FROM node:6 +FROM node:6.15.1-stretch MAINTAINER Petr Sloup ENV NODE_ENV="production" diff --git a/Dockerfile_test b/Dockerfile_test new file mode 100644 index 0000000..baaa989 --- /dev/null +++ b/Dockerfile_test @@ -0,0 +1,35 @@ +# Run tests inside docker without requiring full installation of dependencies on local machine +# Simply run "docker build -f Dockerfile_test ." +# WARNING: sometimes it fails with a core dumped exception + +FROM node:6-stretch +MAINTAINER Petr Sloup + +RUN apt-get -qq update \ +&& DEBIAN_FRONTEND=noninteractive apt-get -y install \ + apt-transport-https \ + curl \ + unzip \ + build-essential \ + python \ + libcairo2-dev \ + libgles2-mesa-dev \ + libgbm-dev \ + libllvm3.9 \ + libprotobuf-dev \ + libxxf86vm-dev \ + xvfb \ +&& apt-get clean + +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +RUN wget -O test_data.zip https://github.com/klokantech/tileserver-gl/releases/download/v1.3.0/test_data.zip +RUN unzip -q test_data.zip -d test_data + +ENV NODE_ENV="test" + +COPY package.json . +RUN npm install +COPY / . +RUN xvfb-run --server-args="-screen 0 1024x768x24" npm test diff --git a/docs/endpoints.rst b/docs/endpoints.rst index 0672f25..b3a5fa0 100644 --- a/docs/endpoints.rst +++ b/docs/endpoints.rst @@ -21,6 +21,10 @@ Rendered tiles * The rendered tiles are not available in the ``tileserver-gl-light`` version. +WMTS Capabilities +============== +* WMTS Capabilities are served at ``/styles/{id}/wmts.xml`` + Static images ============= * Several endpoints: diff --git a/package.json b/package.json index 05bae9b..8fb77c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tileserver-gl", - "version": "2.3.1", + "version": "2.5.0", "description": "Map tile server for JSON GL styles - vector and server side generated raster tiles", "main": "src/main.js", "bin": "src/main.js", @@ -19,31 +19,30 @@ "test": "mocha test/**.js --timeout 10000" }, "dependencies": { - "@mapbox/mapbox-gl-native": "3.5.4", - "@mapbox/mbtiles": "0.9.0", - "@mapbox/sphericalmercator": "1.0.5", - "@mapbox/vector-tile": "1.3.0", + "@mapbox/mapbox-gl-native": "4.0.0", + "@mapbox/mbtiles": "0.10.0", + "@mapbox/sphericalmercator": "1.1.0", + "@mapbox/vector-tile": "1.3.1", "advanced-pool": "0.3.3", - "base64url": "2.0.0", - "canvas": "1.6.8", - "clone": "2.1.1", - "color": "1.0.3", - "commander": "2.1.0", - "cors": "2.8.4", - "express": "4.16.2", + "canvas": "1.6.13", + "clone": "2.1.2", + "color": "3.1.0", + "commander": "2.19.0", + "cors": "2.8.5", + "express": "4.16.4", "glyph-pbf-composite": "0.0.2", - "handlebars": "4.0.11", + "handlebars": "4.0.12", "http-shutdown": "^1.2.0", - "morgan": "1.9.0", - "pbf": "3.0.5", - "proj4": "2.4.4", - "request": "2.83.0", - "sharp": "0.18.2", + "morgan": "1.9.1", + "pbf": "3.1.0", + "proj4": "2.5.0", + "request": "2.88.0", + "sharp": "0.21.1", "tileserver-gl-styles": "1.2.0" }, "devDependencies": { - "should": "^11.2.0", - "mocha": "^3.2.0", - "supertest": "^3.0.0" + "mocha": "^5.2.0", + "should": "^13.2.0", + "supertest": "^3.1.0" } } diff --git a/public/resources/index.css b/public/resources/index.css index 6438b2e..8b5feb7 100644 --- a/public/resources/index.css +++ b/public/resources/index.css @@ -28,7 +28,7 @@ a{ color: #499DCE; transition: color .2s; } -a:hover{ +a:hover { color: #395D73; } .title { @@ -47,7 +47,7 @@ a:hover{ color: #499DCE; font-size:.8em; } -section{ +section { margin: 15px auto; width: 930px; padding: 30px 0; @@ -70,7 +70,7 @@ section{ font-size:20px; background:#fff; } -.item{ +.item { background:#fff; height: 191px; border: 1px solid #ededed; @@ -79,7 +79,7 @@ section{ .item:nth-child(odd) { background-color:#fbfbfb; } -.item img{ +.item img { position: absolute; margin: 30px; width: 128px; @@ -122,10 +122,10 @@ section{ text-decoration: none; font-weight: bold; } -.btn:first-child:hover{ +.btn:first-child:hover { background: #395D73; } -footer{ +footer { width:100%; border-top:1px solid #ededed; text-align:center; @@ -133,7 +133,7 @@ footer{ padding-top:10px; font-size:12px; } -footer img{ +footer img { width: 118px; height: 32px; } @@ -147,6 +147,10 @@ footer a { color: #787878; text-decoration: none; } +.details h3, .identifier { + max-width: 550px; + word-break: break-all; +} /* body background image */ body { @@ -185,31 +189,31 @@ body { .title.light:after { font-size:.6em; } - .title img{ + .title img { width: 200px; } - .subtitle{ + .subtitle { font-size: 20px; margin: 0 0 35px 0; } - .item{ + .item { height: 245px; } - .viewers{ + .viewers { float: left; text-align: left; width: 100%; margin-left: 30px; margin-top: 15px; } - .viewers a{ + .viewers a { display: inline-block; vertical-align: middle; } - .btn{ + .btn { margin: 0 20px 0 0; } - .btn:first-child{ + .btn:first-child { padding: 0 20px; } } diff --git a/public/templates/data.tmpl b/public/templates/data.tmpl index 3d05522..a95388e 100644 --- a/public/templates/data.tmpl +++ b/public/templates/data.tmpl @@ -5,10 +5,10 @@ {{name}} - TileServer GL {{#is_vector}} - - - - + + + + {{/is_vector}} {{^is_vector}} - - - + + + + image/png + + GoogleMapsCompatible + + + + GoogleMapsCompatible + GoogleMapsCompatible EPSG:3857 + GoogleMapsCompatible + urn:ogc:def:crs:EPSG::3857 + + 0 + 559082264.02872 + -20037508.34 20037508.34 + 256 + 256 + 1 + 1 + + + 1 + 279541132.01436 + -20037508.34 20037508.34 + 256 + 256 + 2 + 2 + + + 2 + 139770566.00718 + -20037508.34 20037508.34 + 256 + 256 + 4 + 4 + + + 3 + 69885283.00359 + -20037508.34 20037508.34 + 256 + 256 + 8 + 8 + + + 4 + 34942641.501795 + -20037508.34 20037508.34 + 256 + 256 + 16 + 16 + + + 5 + 17471320.750897 + -20037508.34 20037508.34 + 256 + 256 + 32 + 32 + + + 6 + 8735660.3754487 + -20037508.34 20037508.34 + 256 + 256 + 64 + 64 + + + 7 + 4367830.1877244 + -20037508.34 20037508.34 + 256 + 256 + 128 + 128 + + + 8 + 2183915.0938622 + -20037508.34 20037508.34 + 256 + 256 + 256 + 256 + + + 9 + 1091957.5469311 + -20037508.34 20037508.34 + 256 + 256 + 512 + 512 + + + 10 + 545978.77346554 + -20037508.34 20037508.34 + 256 + 256 + 1024 + 1024 + + + 11 + 272989.38673277 + -20037508.34 20037508.34 + 256 + 256 + 2048 + 2048 + + + 12 + 136494.69336639 + -20037508.34 20037508.34 + 256 + 256 + 4096 + 4096 + + + 13 + 68247.346683193 + -20037508.34 20037508.34 + 256 + 256 + 8192 + 8192 + + + 14 + 34123.673341597 + -20037508.34 20037508.34 + 256 + 256 + 16384 + 16384 + + + 15 + 17061.836670798 + -20037508.34 20037508.34 + 256 + 256 + 32768 + 32768 + + + 16 + 8530.9183353991 + -20037508.34 20037508.34 + 256 + 256 + 65536 + 65536 + + + 17 + 4265.4591676996 + -20037508.34 20037508.34 + 256 + 256 + 131072 + 131072 + + + 18 + 2132.7295838498 + -20037508.34 20037508.34 + 256 + 256 + 262144 + 262144 + + WGS84 + WGS84 EPSG:4326 + WGS84 + urn:ogc:def:crs:EPSG::4326 + + 0 + 279541132.01436 + 90 -180 + 256 + 256 + 2 + 1 + + + 1 + 139770566.00718 + 90 -180 + 256 + 256 + 4 + 2 + + + 2 + 69885283.00359 + 90 -180 + 256 + 256 + 8 + 4 + + + 3 + 34942641.501795 + 90 -180 + 256 + 256 + 16 + 8 + + + 4 + 17471320.750897 + 90 -180 + 256 + 256 + 32 + 16 + + + 5 + 8735660.3754487 + 90 -180 + 256 + 256 + 64 + 32 + + + 6 + 4367830.1877244 + 90 -180 + 256 + 256 + 128 + 64 + + + 7 + 2183915.0938622 + 90 -180 + 256 + 256 + 256 + 128 + + + 8 + 1091957.5469311 + 90 -180 + 256 + 256 + 512 + 256 + + + 9 + 545978.77346554 + 90 -180 + 256 + 256 + 1024 + 512 + + + 10 + 272989.38673277 + 90 -180 + 256 + 256 + 2048 + 1024 + + + 11 + 136494.69336639 + 90 -180 + 256 + 256 + 4096 + 2048 + + + 12 + 68247.346683193 + 90 -180 + 256 + 256 + 8192 + 4096 + + + 13 + 34123.673341597 + 90 -180 + 256 + 256 + 16384 + 8192 + + + 14 + 17061.836670798 + 90 -180 + 256 + 256 + 32768 + 16384 + + + 15 + 8530.9183353991 + 90 -180 + 256 + 256 + 65536 + 32768 + + + 16 + 4265.4591676996 + 90 -180 + 256 + 256 + 131072 + 65536 + + + 17 + 2132.7295838498 + 90 -180 + 256 + 256 + 262144 + 131072 + + + 18 + + 90 -180 + 256 + 256 + 524288 + 262144 + + + + \ No newline at end of file diff --git a/run.sh b/run.sh index d952cc4..829163d 100755 --- a/run.sh +++ b/run.sh @@ -5,19 +5,33 @@ _term() { kill -TERM "$child" 2>/dev/null } -trap _term TERM +trap _term SIGTERM +trap _term SIGINT +xvfbMaxStartWaitTime=5 +displayNumber=99 +screenNumber=0 -start-stop-daemon --start --pidfile ~/xvfb.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset -echo "Waiting 3 seconds for xvfb to start..." -sleep 3 +# Delete files if they were not cleaned by last run +rm -rf /tmp/.X11-unix /tmp/.X${displayNumber}-lock ~/xvfb.pid -export DISPLAY=:99.0 +echo "Starting Xvfb on display ${displayNumber}" +start-stop-daemon --start --pidfile ~/xvfb.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :${displayNumber} -screen ${screenNumber} 1024x768x24 -ac +extension GLX +render -noreset +# Wait to be able to connect to the port. This will exit if it cannot in 15 minutes. +timeout ${xvfbMaxStartWaitTime} bash -c "while ! xdpyinfo -display :${displayNumber} >/dev/null; do sleep 0.5; done" +if [ $? -ne 0 ]; then + echo "Could not connect to display ${displayNumber} in ${xvfbMaxStartWaitTime} seconds time." + exit 1 +fi + +export DISPLAY=:${displayNumber}.${screenNumber} + +echo cd /data node /usr/src/app/ -p 80 "$@" & child=$! wait "$child" -start-stop-daemon --stop --pidfile ~/xvfb.pid # stop xvfb when exiting +start-stop-daemon --stop --retry 5 --pidfile ~/xvfb.pid # stop xvfb when exiting rm ~/xvfb.pid diff --git a/src/main.js b/src/main.js index 640bbb1..e703bc3 100644 --- a/src/main.js +++ b/src/main.js @@ -35,13 +35,17 @@ var opts = require('commander') .option( '-p, --port ', 'Port [8080]', - parseInt, - 8080 + 8080, + parseInt ) .option( '-C|--no-cors', 'Disable Cross-origin resource sharing headers' ) + .option( + '-u|--public_url ', + 'Enable exposing the server on subpaths, not necessarily the root of the domain' + ) .option( '-V, --verbose', 'More verbose output' @@ -50,6 +54,14 @@ var opts = require('commander') '-s, --silent', 'Less verbose output' ) + .option( + '-l|--log_file ', + 'output log file (defaults to standard out)' + ) + .option( + '-f|--log_format ', + 'define the log format: https://github.com/expressjs/morgan#morganformat-options' + ) .version( packageJson.version, '-v, --version' @@ -59,13 +71,20 @@ var opts = require('commander') console.log('Starting ' + packageJson.name + ' v' + packageJson.version); var startServer = function(configPath, config) { + var publicUrl = opts.public_url; + if (publicUrl && publicUrl.lastIndexOf('/') !== publicUrl.length - 1) { + publicUrl += '/'; + } return require('./server')({ configPath: configPath, config: config, bind: opts.bind, port: opts.port, cors: opts.cors, - silent: opts.silent + silent: opts.silent, + logFile: opts.log_file, + logFormat: opts.log_format, + publicUrl: publicUrl }); }; diff --git a/src/serve_data.js b/src/serve_data.js index 4acda69..8b6d487 100644 --- a/src/serve_data.js +++ b/src/serve_data.js @@ -18,7 +18,7 @@ try { var utils = require('./utils'); -module.exports = function(options, repo, params, id, styles) { +module.exports = function(options, repo, params, id, styles, publicUrl) { var app = express().disable('x-powered-by'); var mbtilesFile = path.resolve(options.paths.mbtiles, params.mbtiles); @@ -89,7 +89,7 @@ module.exports = function(options, repo, params, id, styles) { source.getTile(z, x, y, function(err, data, headers) { if (err) { if (/does not exist/.test(err.message)) { - return res.status(404).send(err.message); + return res.status(204).send(); } else { return res.status(500).send(err.message); } @@ -178,7 +178,7 @@ module.exports = function(options, repo, params, id, styles) { app.get('/' + id + '.json', function(req, res, next) { var info = clone(tileJSON); info.tiles = utils.getTileUrls(req, info.tiles, - 'data/' + id, info.format, { + 'data/' + id, info.format, publicUrl, { 'pbf': options.pbfAlias }); return res.send(info); diff --git a/src/serve_rendered.js b/src/serve_rendered.js index aca8295..3c8f641 100644 --- a/src/serve_rendered.js +++ b/src/serve_rendered.js @@ -97,7 +97,7 @@ function createEmptyResponse(format, color, callback) { }); } -module.exports = function(options, repo, params, id, dataResolver) { +module.exports = function(options, repo, params, id, publicUrl, dataResolver) { var app = express().disable('x-powered-by'); var maxScaleFactor = Math.min(Math.floor(options.maxScaleFactor || 3), 9); @@ -747,7 +747,7 @@ module.exports = function(options, repo, params, id, dataResolver) { app.get('/' + id + '.json', function(req, res, next) { var info = clone(tileJSON); info.tiles = utils.getTileUrls(req, info.tiles, - 'styles/' + id, info.format); + 'styles/' + id, info.format, publicUrl); return res.send(info); }); diff --git a/src/serve_style.js b/src/serve_style.js index cd9dfe9..a4b8601 100644 --- a/src/serve_style.js +++ b/src/serve_style.js @@ -6,8 +6,9 @@ var path = require('path'), var clone = require('clone'), express = require('express'); +var utils = require('./utils'); -module.exports = function(options, repo, params, id, reportTiles, reportFont) { +module.exports = function(options, repo, params, id, publicUrl, reportTiles, reportFont) { var app = express().disable('x-powered-by'); var styleFile = path.resolve(options.paths.styles, params.style); @@ -79,7 +80,7 @@ module.exports = function(options, repo, params, id, reportTiles, reportFont) { query = '?' + queryParams.join('&'); } return url.replace( - 'local://', req.protocol + '://' + req.headers.host + '/') + query; + 'local://', utils.getPublicUrl(publicUrl, req)) + query; }; var styleJSON_ = clone(styleJSON); diff --git a/src/server.js b/src/server.js index db67be4..26bc6e7 100644 --- a/src/server.js +++ b/src/server.js @@ -7,8 +7,7 @@ process.env.UV_THREADPOOL_SIZE = var fs = require('fs'), path = require('path'); -var base64url = require('base64url'), - clone = require('clone'), +var clone = require('clone'), cors = require('cors'), enableShutdown = require('http-shutdown'), express = require('express'), @@ -42,12 +41,11 @@ function start(opts) { app.enable('trust proxy'); - if (process.env.NODE_ENV == 'production') { - app.use(morgan('tiny', { - skip: function(req, res) { return opts.silent && (res.statusCode == 200 || res.statusCode == 304) } - })); - } else if (process.env.NODE_ENV !== 'test') { - app.use(morgan('dev', { + if (process.env.NODE_ENV !== 'test') { + var defaultLogFormat = process.env.NODE_ENV == 'production' ? 'tiny' : 'dev'; + var logFormat = opts.logFormat || defaultLogFormat; + app.use(morgan(logFormat, { + stream: opts.logFile ? fs.createWriteStream(opts.logFile, { flags: 'a' }) : process.stdout, skip: function(req, res) { return opts.silent && (res.statusCode == 200 || res.statusCode == 304) } })); } @@ -113,7 +111,7 @@ function start(opts) { } if (item.serve_data !== false) { - startupPromises.push(serve_style(options, serving.styles, item, id, + startupPromises.push(serve_style(options, serving.styles, item, id, opts.publicUrl, function(mbtiles, fromData) { var dataItemId; Object.keys(data).forEach(function(id) { @@ -149,7 +147,7 @@ function start(opts) { if (item.serve_rendered !== false) { if (serve_rendered) { startupPromises.push( - serve_rendered(options, serving.rendered, item, id, + serve_rendered(options, serving.rendered, item, id, opts.publicUrl, function(mbtiles) { var mbtilesFile; Object.keys(data).forEach(function(id) { @@ -183,7 +181,7 @@ function start(opts) { } startupPromises.push( - serve_data(options, serving.data, item, id, serving.styles).then(function(sub) { + serve_data(options, serving.data, item, id, serving.styles, opts.publicUrl).then(function(sub) { app.use('/data/', sub); }) ); @@ -198,7 +196,7 @@ function start(opts) { version: styleJSON.version, name: styleJSON.name, id: id, - url: req.protocol + '://' + req.headers.host + + url: utils.getPublicUrl(opts.publicUrl, req) + '/styles/' + id + '/style.json' + query }); }); @@ -214,7 +212,7 @@ function start(opts) { } else { path = type + '/' + id; } - info.tiles = utils.getTileUrls(req, info.tiles, path, info.format, { + info.tiles = utils.getTileUrls(req, info.tiles, path, info.format, opts.publicUrl, { 'pbf': options.pbfAlias }); arr.push(info); @@ -265,10 +263,12 @@ function start(opts) { } } data['server_version'] = packageJson.name + ' v' + packageJson.version; + data['public_url'] = opts.publicUrl || '/'; data['is_light'] = isLight; data['key_query_part'] = req.query.key ? 'key=' + req.query.key + '&' : ''; data['key_query'] = req.query.key ? '?key=' + req.query.key : ''; + if (template === 'wmts') res.set('Content-Type', 'text/xml'); return res.status(200).send(compiled(data)); }); resolve(); @@ -296,14 +296,9 @@ function start(opts) { Math.floor(centerPx[1] / 256) + '.png'; } - var query = req.query.key ? ('?key=' + req.query.key) : ''; - style.wmts_link = 'http://wmts.maptiler.com/' + - base64url('http://' + req.headers.host + - '/styles/' + id + '.json' + query) + '/wmts'; - var tiles = utils.getTileUrls( req, style.serving_rendered.tiles, - 'styles/' + id, style.serving_rendered.format); + 'styles/' + id, style.serving_rendered.format, opts.publicUrl); style.xyz_link = tiles[0]; } }); @@ -325,13 +320,8 @@ function start(opts) { Math.floor(centerPx[1] / 256) + '.' + data_.format; } - var query = req.query.key ? ('?key=' + req.query.key) : ''; - data_.wmts_link = 'http://wmts.maptiler.com/' + - base64url('http://' + req.headers.host + - '/data/' + id + '.json' + query) + '/wmts'; - var tiles = utils.getTileUrls( - req, data_.tiles, 'data/' + id, data_.format, { + req, data_.tiles, 'data/' + id, data_.format, opts.publicUrl, { 'pbf': options.pbfAlias }); data_.xyz_link = tiles[0]; @@ -374,6 +364,20 @@ function start(opts) { return res.redirect(301, '/styles/' + req.params.id + '/'); }); */ + serveTemplate('/styles/:id/wmts.xml', 'wmts', function(req) { + var id = req.params.id; + var wmts = clone((config.styles || {})[id]); + if (!wmts) { + return null; + } + if (wmts.hasOwnProperty("serve_rendered") && !wmts.serve_rendered) { + return null; + } + wmts.id = id; + wmts.name = (serving.styles[id] || serving.rendered[id]).name; + wmts.baseUrl = (req.get('X-Forwarded-Protocol')?req.get('X-Forwarded-Protocol'):req.protocol) + '://' + req.get('host'); + return wmts; + }); serveTemplate('/data/:id/$', 'data', function(req) { var id = req.params.id; diff --git a/src/utils.js b/src/utils.js index 2dacc6d..dc58b31 100644 --- a/src/utils.js +++ b/src/utils.js @@ -6,7 +6,12 @@ var path = require('path'), var clone = require('clone'), glyphCompose = require('glyph-pbf-composite'); -module.exports.getTileUrls = function(req, domains, path, format, aliases) { + +module.exports.getPublicUrl = function(publicUrl, req) { + return publicUrl || (req.protocol + '://' + req.headers.host + '/') +} + +module.exports.getTileUrls = function(req, domains, path, format, publicUrl, aliases) { if (domains) { if (domains.constructor === String && domains.length > 0) { @@ -49,10 +54,14 @@ module.exports.getTileUrls = function(req, domains, path, format, aliases) { } var uris = []; - domains.forEach(function(domain) { - uris.push(req.protocol + '://' + domain + '/' + path + - '/{z}/{x}/{y}.' + format + query); - }); + if (!publicUrl) { + domains.forEach(function(domain) { + uris.push(req.protocol + '://' + domain + '/' + path + + '/{z}/{x}/{y}.' + format + query); + }); + } else { + uris.push(publicUrl + path + '/{z}/{x}/{y}.' + format + query) + } return uris; }; diff --git a/test/setup.js b/test/setup.js index 963bb26..2edaab0 100644 --- a/test/setup.js +++ b/test/setup.js @@ -8,7 +8,8 @@ before(function() { process.chdir('test_data'); var running = require('../src/server')({ configPath: 'config.json', - port: 8888 + port: 8888, + publicUrl: '/test/' }); global.app = running.app; global.server = running.server; @@ -17,5 +18,5 @@ before(function() { after(function() { console.log('global teardown'); - global.server.close(function() { console.log('Done'); }); + global.server.close(function() { console.log('Done'); process.exit(); }); }); diff --git a/test/style.js b/test/style.js index cf4be9a..938798d 100644 --- a/test/style.js +++ b/test/style.js @@ -23,6 +23,7 @@ describe('Styles', function() { res.body.sources.should.be.Object(); res.body.glyphs.should.be.String(); res.body.sprite.should.be.String(); + res.body.sprite.should.equal('/test/styles/test-style/sprite'); res.body.layers.should.be.Array(); }).end(done); }); diff --git a/test/tiles_data.js b/test/tiles_data.js index 2e6566a..5b9b68e 100644 --- a/test/tiles_data.js +++ b/test/tiles_data.js @@ -23,6 +23,6 @@ describe('Vector tiles', function() { testTile(prefix, 0, 1, 0, 404); testTile(prefix, 0, 0, 1, 404); - testTile(prefix, 14, 0, 0, 404); // non existent tile + testTile(prefix, 14, 0, 0, 204); // non existent tile }); });