diff --git a/js/iD/Connection.js b/js/iD/Connection.js index e10f5617d..f058c0bb7 100755 --- a/js/iD/Connection.js +++ b/js/iD/Connection.js @@ -35,7 +35,7 @@ iD.Connection = function() { var nodes = [], nelems = obj.getElementsByTagName('nd'); for (var i = 0; i < nelems.length; i++) { var item = nelems[i]; - nodes.push(item.attributes.ref.nodeValue); + nodes.push(+item.attributes.ref.nodeValue); } return nodes; } @@ -55,7 +55,7 @@ iD.Connection = function() { for (var i = 0; i < elems.length; i++) { var item = elems[i]; - var id = item.attributes.ref.nodeValue, + var id = +item.attributes.ref.nodeValue, type = item.attributes.type.nodeValue, role = item.attributes.role.nodeValue; @@ -74,10 +74,10 @@ iD.Connection = function() { function objectData(obj) { return { type: obj.nodeName, - id: obj.attributes.id.nodeValue, + id: +obj.attributes.id.nodeValue, tags: getTags(obj), - lat: (obj.attributes.lat) ? obj.attributes.lat.nodeValue : null, - lon: (obj.attributes.lon) ? obj.attributes.lon.nodeValue : null, + lat: (obj.attributes.lat) ? +obj.attributes.lat.nodeValue : null, + lon: (obj.attributes.lon) ? +obj.attributes.lon.nodeValue : null, members: getMembers(obj), nodes: getNodes(obj) }; diff --git a/js/iD/Node.js b/js/iD/Node.js index dfd613890..7dba53443 100644 --- a/js/iD/Node.js +++ b/js/iD/Node.js @@ -3,8 +3,6 @@ iD.Node = function(id, lat, lon, tags, loaded) { this._id = iD.Util.id(); this.lat = lat; this.lon = lon; - this[0] = lon; - this[1] = lat; this.tags = tags || {}; this.loaded = (loaded === undefined) ? true : loaded; }; diff --git a/js/iD/renderer/Map.js b/js/iD/renderer/Map.js index 1a56682c7..5d2578696 100755 --- a/js/iD/renderer/Map.js +++ b/js/iD/renderer/Map.js @@ -113,7 +113,8 @@ iD.Map = function(obj) { function nodeline(d) { return linegen(d.children.map(function(n) { - return connection.graph().index[n]; + var node = connection.graph().index[n]; + return [node.lon, node.lat]; })); }