diff --git a/index.html b/index.html index 8f9c1444d..020d806bd 100644 --- a/index.html +++ b/index.html @@ -211,8 +211,13 @@ iD.data.load(function() { id = iD(); + d3.select("#id-container") .call(id.ui()); + + d3.select("#about").insert('li', '.user-list') + .attr('class', 'source-switch') + .call(iD.ui.SourceSwitch(id)); }); diff --git a/js/id/ui/source_switch.js b/js/id/ui/source_switch.js index 8b9e2bd20..895a11a42 100644 --- a/js/id/ui/source_switch.js +++ b/js/id/ui/source_switch.js @@ -5,10 +5,11 @@ iD.ui.SourceSwitch = function(context) { if (context.history().hasChanges() && !window.confirm(t('source_switch.lose_changes'))) return; - var live = d3.select(this).classed('live'); + var live = d3.select(this) + .classed('live'); context.connection() - .url(live ? 'http://api06.dev.openstreetmap.org' : 'http://www.openstreetmap.org'); + .switch(live ? iD.data.keys[1] : iD.data.keys[0]); context.map() .flush();