Remove grid JSON stringify workarounds.

This commit is contained in:
Young Hahn
2011-05-11 10:23:22 -04:00
parent aed3fb1d8a
commit 2e19f81e6c
2 changed files with 1 additions and 4 deletions

View File

@@ -28,15 +28,12 @@ module.exports = {
var layer = {}; var layer = {};
f && (layer.formatter = f); f && (layer.formatter = f);
l && (layer.legend = l); l && (layer.legend = l);
options.jsonp && (layer = options.jsonp + '(' + JSON.stringify(layer) + ');');
callback(null, [layer, { 'Content-Type': 'text/javascript' }]); callback(null, [layer, { 'Content-Type': 'text/javascript' }]);
} }
); );
break; break;
case 'grid.json': case 'grid.json':
resource.grid(options.x, options.y, options.z, function(err, grid) { resource.grid(options.x, options.y, options.z, function(err, grid) {
grid = JSON.stringify(grid);
options.jsonp && (grid = options.jsonp + '(' + grid + ');');
callback(err, [grid, { 'Content-Type': 'text/javascript' }]); callback(err, [grid, { 'Content-Type': 'text/javascript' }]);
}); });
break; break;

View File

@@ -24,7 +24,7 @@
"zlib" : ">= 1.0.3 < 1.1.0" "zlib" : ">= 1.0.3 < 1.1.0"
}, },
"engines": { "engines": {
"node": ">= 0.2.6" "node": ">= 0.4.0"
}, },
"version" : "0.0.1" "version" : "0.0.1"
} }