From 098ed6b203c8c9953b38442d3334fa2cd503bb42 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Mon, 29 Jun 2015 16:39:35 +0200 Subject: [PATCH] New endpoint for named maps tiles --- lib/cartodb/controllers/named_maps.js | 6 ++++++ 1 file changed, 6 insertions(+) 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;