From f6ff3e678baeb6a321ada80744c184634be3ab54 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 28 Jan 2013 10:16:51 -0500 Subject: [PATCH] Use osmId/Entity.id.toOSM --- js/id/graph/node.js | 2 +- js/id/graph/way.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/id/graph/node.js b/js/id/graph/node.js index 28aaad0bc..b9a171752 100644 --- a/js/id/graph/node.js +++ b/js/id/graph/node.js @@ -26,7 +26,7 @@ _.extend(iD.Node.prototype, { asJXON: function(changeset_id) { var r = { node: { - '@id': this.id.replace('n', ''), + '@id': this.osmId(), '@lon': this.loc[0], '@lat': this.loc[1], '@version': (this.version || 0), diff --git a/js/id/graph/way.js b/js/id/graph/way.js index d1b2820db..aae89a6ce 100644 --- a/js/id/graph/way.js +++ b/js/id/graph/way.js @@ -88,10 +88,10 @@ _.extend(iD.Way.prototype, { asJXON: function(changeset_id) { var r = { way: { - '@id': this.id.replace('w', ''), + '@id': this.osmId(), '@version': this.version || 0, nd: _.map(this.nodes, function(id) { - return { keyAttributes: { ref: id.replace('n', '') } }; + return { keyAttributes: { ref: iD.Entity.id.toOSM(id) } }; }), tag: _.map(this.tags, function(v, k) { return { keyAttributes: { k: k, v: v } };