aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Engel <mark.c.engel@gmail.com>2011-01-21 17:49:43 +0100
committerMark Engel <mark.c.engel@gmail.com>2011-01-21 17:49:43 +0100
commit8c8e209fc347623464e1ddc6051abaf84cb77912 (patch)
tree0b85ce17c1588ab5f0f522c9fd84a27a075a9cf3
parenteee248c50cf60c1c24b090d5c58fba6bd9711d20 (diff)
downloadosm-xapi-8c8e209fc347623464e1ddc6051abaf84cb77912.tar.gz
osm-xapi-8c8e209fc347623464e1ddc6051abaf84cb77912.tar.xz
osm-xapi-8c8e209fc347623464e1ddc6051abaf84cb77912.zip
error while merging
-rw-r--r--src/nodejs/no1.js19
1 files 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("<xml>");
+ query.on('row', function(row) {
+ if(!success) {
+ success = true;
+ res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.write("<xml>");
}
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));
- });
});
});
}