diff --git a/css/app.css b/css/app.css index a70dfd136..4ece851ee 100644 --- a/css/app.css +++ b/css/app.css @@ -204,6 +204,7 @@ button small { .inspector tbody td { border: 1px solid #ccc; + width:150px; } .inspector input { diff --git a/index.html b/index.html index db8c4b863..b14274186 100644 --- a/index.html +++ b/index.html @@ -15,33 +15,33 @@ - - - - + + + + + + + + + + + + - - - - - - - + + - - + - + + + - - - - - - - - - + + + + +
diff --git a/js/iD/Taginfo.js b/js/iD/Taginfo.js index b8f82b9ac..d6524c9ca 100644 --- a/js/iD/Taginfo.js +++ b/js/iD/Taginfo.js @@ -1,25 +1,25 @@ -// Taginfo service singleton -iD.Taginfo = (function() { +// Taginfo +iD.taginfo = (function() { var taginfo = {}, endpoint = 'http://taginfo.openstreetmap.org/api/2/'; + function qsString(obj) { + return Object.keys(obj).sort().map(function(key) { + return encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]); + }).join('&'); + } + // Given a key, return common values // TODO: get type, count correctly based on it taginfo.values = function(key, callback) { - $.ajax({ - url: endpoint + 'db/keys/values', - data: { + d3.json(endpoint + 'db/keys/values' + + qsString({ key: key, sortname: 'count_all', sortorder: 'desc', page: 1 - }, - dataType: 'jsonp', - success: function(resp) { - if (resp.data) callback(resp.data); - } - }); + }), callback); }; return taginfo;