aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Engel <mark.c.engel@gmail.com>2011-01-21 17:11:21 +0100
committerMark Engel <mark.c.engel@gmail.com>2011-01-21 17:11:21 +0100
commitbe4bf1e3bc92921c502508072cd75196238a3fca (patch)
tree887ce58ca0afebf975c7fd747eb0475a48a5d3b2 /src
parent7512d87e6474b7205c69ff4071293d45e75692d0 (diff)
downloadosm-xapi-be4bf1e3bc92921c502508072cd75196238a3fca.tar.gz
osm-xapi-be4bf1e3bc92921c502508072cd75196238a3fca.tar.xz
osm-xapi-be4bf1e3bc92921c502508072cd75196238a3fca.zip
removed old code
Diffstat (limited to 'src')
-rw-r--r--src/nodejs/no1.js32
1 files changed, 3 insertions, 29 deletions
diff --git a/src/nodejs/no1.js b/src/nodejs/no1.js
index 00c7393..c31bc5f 100644
--- a/src/nodejs/no1.js
+++ b/src/nodejs/no1.js
@@ -99,18 +99,7 @@ function nodeBboxHandler(req, res, key, value, left, bottom, right, top) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write("<xml>");
}
-
- console.log(row);
-
- var node = builder.begin('node')
- .att('id', row.id)
- .att('timetamp', toISO8601(row.tstamp))
- .att('version', row.version)
- .att('changeset', row.changeset_id)
- .att('lat', row.lat)
- .att('lon', row.lon);
-
- res.write(createXmlFromRow(row));
+ res.write(createXmlFromRow(row));
});
});
}
@@ -119,7 +108,7 @@ function createXmlFromRow(row) {
console.log(row);
var node = builder.begin('node')
.att('id', row.id)
- .att('timetamp', toISO8601(row.tstamp))
+ .att('timestamp', toISO8601(row.tstamp))
.att('version', row.version)
.att('changeset', row.changeset_id)
.att('lat', row.lat)
@@ -203,22 +192,7 @@ function wayBboxHandler(req, res, key, value, left, bottom, right, top) {
res.end();
});
subquery.on('row', function(row) {
- console.log(row);
- var node = builder.begin('node')
- .att('id', row.id)
- .att('timetamp', toISO8601(row.tstamp))
- .att('version', row.version)
- .att('changeset', row.changeset_id)
- .att('lat', row.lat)
- .att('lon', row.lon);
- if(row.tags != '{}') {
- var temp = row.tags.replace("{","").replace("}","").split(",");
- for(var x=0;x<temp.length;x=x+2)
- node.ele('tag')
- .att('k',escape(temp[x]))
- .att('v',escape(temp[x+1]));
- }
- res.write(builder.toString({pretty:'true'}));
+ res.write(createXmlFromRow(row));
});
//console.log(createNodesForWayQuery(row.nodes));