From 24922d401a23b640b09fccfc1d0bc561d596534e Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Thu, 1 Nov 2012 16:04:24 -0400 Subject: [PATCH] Fix marker rendering, complete Way XML output, work on Node XML output. --- index.html | 112 ++++++++++++++++++------------------------ js/iD/Node.js | 2 - js/iD/Way.js | 2 - js/iD/XML.js | 73 +++++++++++++++++---------- js/iD/renderer/Map.js | 2 +- js/lib/jxon.js | 2 - 6 files changed, 95 insertions(+), 98 deletions(-) diff --git a/index.html b/index.html index f62cfc515..6286eb0ec 100755 --- a/index.html +++ b/index.html @@ -9,23 +9,36 @@ +
+
+
+
+
+ +
+ +
+ +
+
+

Work in progress: introduction, + code, + docs. + Imagery © 2012 Bing, GeoEye, Getmapping, Intermap, Microsoft.

+
+ - - - - - - - - - - @@ -42,63 +55,34 @@ -
-
-
-
-
+ - + }); + + diff --git a/js/iD/Node.js b/js/iD/Node.js index 22d652dbf..85522f627 100644 --- a/js/iD/Node.js +++ b/js/iD/Node.js @@ -20,5 +20,3 @@ iD.Node.prototype = { } }; - -// iD.Util.extend(iD.Node, iD.Entity); diff --git a/js/iD/Way.js b/js/iD/Way.js index 77e77bda0..e8eb17b09 100644 --- a/js/iD/Way.js +++ b/js/iD/Way.js @@ -64,5 +64,3 @@ iD.Way.prototype = { bounds[0][1] > extent[1][1]); } }; - -// iD.Util.extend(iD.Way, iD.Entity); diff --git a/js/iD/XML.js b/js/iD/XML.js index c68649a88..ed2827c09 100644 --- a/js/iD/XML.js +++ b/js/iD/XML.js @@ -4,35 +4,54 @@ iD.XML = { return this.mappings[entity.type](entity); } }, - mappings: { - node: function(entity) { - /* - return { - type: 'Feature', - properties: entity.tags, - geometry: { - type: 'Point', - coordinates: [entity.lon, entity.lat] - } - }; - */ - }, - way: function(entity) { - return (new XMLSerializer()).serializeToString( - JXON.unbuild({ - way: { - '@id': entity.id, - 'nd': entity.children.map(function(e) { - return { - keyAttributes: { - ref: e.id - } - }; - }) - } - })).replace(/>/g,'>'). + decode: function(s) { + return s.replace(/>/g,'>'). replace(/