diff --git a/lib/cartodb/controllers/named_maps.js b/lib/cartodb/controllers/named_maps.js index df702233..31c2e0b8 100644 --- a/lib/cartodb/controllers/named_maps.js +++ b/lib/cartodb/controllers/named_maps.js @@ -19,6 +19,7 @@ module.exports = NamedMapsController; var cdbRequest = new CdbRequest(); NamedMapsController.prototype.register = function(app) { + app.get(this.templateBaseUrl + '/:template_id/:layerFilter/:z/:x/:y.:format', this.tile.bind(this)); app.get(this.templateBaseUrl + '/:template_id/jsonp', this.jsonp.bind(this)); app.post(this.templateBaseUrl, this.create.bind(this)); app.put(this.templateBaseUrl + '/:template_id', this.update.bind(this)); @@ -29,6 +30,11 @@ NamedMapsController.prototype.register = function(app) { app.post(this.templateBaseUrl + '/:template_id', this.instantiate.bind(this)); }; +NamedMapsController.prototype.tile = function(req, res) { + this.app.doCORS(res); + this.app.sendResponse(res, [{}, 200]); +}; + // Add a template NamedMapsController.prototype.create = function(req, res) { var self = this;