From 8c8e209fc347623464e1ddc6051abaf84cb77912 Mon Sep 17 00:00:00 2001 From: Mark Engel Date: Fri, 21 Jan 2011 17:49:43 +0100 Subject: error while merging --- src/nodejs/no1.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/nodejs/no1.js b/src/nodejs/no1.js index 9258e15..66c16c5 100644 --- a/src/nodejs/no1.js +++ b/src/nodejs/no1.js @@ -47,8 +47,8 @@ function nodeWorldHandler(req, res, key, value) { function nodeBboxHandler(req, res, key, value, left, bottom, right, top) { log.error("nodeBboxHandler"); db_connect(res, function(client) { - log.info(createNodeBboxQuery(key, value, left, bottom, right, top)); - var success = false; + log.info(createNodeBboxQuery(key, value, left, bottom, right, top)); + var success = false; var query = client.query(createNodeBboxQuery(key, value, left, bottom, right, top)); query.on('error', function(err) { @@ -71,17 +71,17 @@ function nodeBboxHandler(req, res, key, value, left, bottom, right, top) { } }); - query.on('row', function(row) { - if(!success) { - success = true; - res.writeHead(200, {'Content-Type': 'text/plain'}); - res.write(""); + query.on('row', function(row) { + if(!success) { + success = true; + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.write(""); } res.write(xmlGenerator.createNode(row)); - }); - }); }); +}); } + function wayWorldHandler(req, res, key, value) { res.writeHead(200, {'Content-Type': 'text/plain'}); } @@ -157,7 +157,6 @@ function wayBboxHandler(req, res, key, value, left, bottom, right, top) { //console.log(createNodesForWayQuery(row.nodes)); } res.write(xmlGenerator.createWay(row)); - }); }); }); } -- cgit v1.2.3