Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

Commit

Permalink
Remove unused layer.json endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Young Hahn committed Jul 29, 2011
1 parent 4eb01ba commit 2c6c28e
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions servers/Tile.bones
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ var path = require('path'),
server = Bones.Server.extend({});

server.prototype.initialize = function() {
_.bindAll(this, 'load', 'grid', 'layer', 'getArtifact');
_.bindAll(this, 'load', 'grid', 'getArtifact');
this.get('/1.0.0/:id/:z/:x/:y.:format(png8|png|jpeg[\\d]+|jpeg)', this.load, this.getArtifact);
this.get('/1.0.0/:id/:z/:x/:y.:format(grid.json)', this.load, this.grid, this.getArtifact);
this.get('/1.0.0/:id/layer.json', this.load, this.layer);
};

server.prototype.load = function(req, res, next) {
Expand Down Expand Up @@ -71,14 +70,3 @@ server.prototype.grid = function(req, res, next) {
next();
};

server.prototype.layer = function(req, res, next) {
if (!res.project.get('formatter') && !res.project.get('legend')) {
next(new Error.HTTP('Not found.', 404));
} else {
req.query.callback = 'grid'; // Force jsonp.
res.send({
formatter: res.project.get('formatter'),
legend: res.project.get('legend')
});
}
};

0 comments on commit 2c6c28e

Please sign in to comment.