From 78cf64b64e978db632c066365dc3e21fc5af7b71 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Mon, 1 Apr 2013 10:51:41 -0400 Subject: [PATCH] use Bing for walkthrough fixes #1210 --- js/id/ui/intro.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/id/ui/intro.js b/js/id/ui/intro.js index d6a7010d5..877626c1e 100644 --- a/js/id/ui/intro.js +++ b/js/id/ui/intro.js @@ -9,6 +9,7 @@ iD.ui.intro = function(context) { // Save current map state var history = context.history().toJSON(), hash = window.location.hash, + background = context.background().source(), opacity = d3.select('.layer-layer:first-child').style('opacity'), loadedTiles = context.connection().loadedTiles(), baseEntities = context.history().graph().base().entities; @@ -18,6 +19,10 @@ iD.ui.intro = function(context) { context.history().save().reset(); context.history().merge(iD.Graph().load(JSON.parse(iD.introGraph)).entities); + context.background().source(_.find(context.backgroundSources(), function(d) { + return d.data.sourcetag === "Bing"; + })); + // Block saving var savebutton = d3.select('#bar button.save'), save = savebutton.on('click'); @@ -53,6 +58,7 @@ iD.ui.intro = function(context) { d3.select('.layer-layer:first-child').style('opacity', opacity); context.connection().toggle(true).flush().loadedTiles(loadedTiles); context.history().reset().merge(baseEntities); + context.background().source(background); if (history) context.history().fromJSON(history); window.location.replace(hash); window.onbeforeunload = beforeunload;