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 } };