Asi rapido y sin probar
Código Javascript
:
Ver originalvar sql = "SELECT images.tile_data FROM images, map WHERE images.tile_id = map.tile_id AND map.zoom_level = 14 AND map.tile_column = 14125";
var output;
res.writeHead(200, {'Content-Type': 'image/jpg' });
db.each(sql, function(err, row) {
console.log(row.tile_data);
output += row.tile_data;
});
res.end(output, 'binary');