From 42712e80a4444805c8dd3136c40ef891bb638e25 Mon Sep 17 00:00:00 2001 From: Mark Engel Date: Fri, 21 Jan 2011 16:30:44 +0100 Subject: refactored creation of rows to xml into own function --- src/nodejs/no1.js | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/nodejs/no1.js b/src/nodejs/no1.js index 1b71766..79d50f5 100644 --- a/src/nodejs/no1.js +++ b/src/nodejs/no1.js @@ -103,28 +103,32 @@ function nodeBboxHandler(req, res, key, value, left, bottom, right, top) { res.write(""); } - 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