From 5c6398e7732b36513b2272920300b32ffaa87557 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Mon, 25 Mar 2013 15:05:30 -0400 Subject: [PATCH] Position bing logo, add attribution --- css/app.css | 5 +++++ js/id/renderer/background_source.js | 10 ++++++---- js/id/ui/attribution.js | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/css/app.css b/css/app.css index 25ba70bcf..49173df81 100644 --- a/css/app.css +++ b/css/app.css @@ -1564,6 +1564,11 @@ div.combobox { color:#fff; } +.source-image { + height:20px; + vertical-align:top; +} + .user-list a:not(:last-child):after { content: ', '; } diff --git a/js/id/renderer/background_source.js b/js/id/renderer/background_source.js index d0d3f1197..46c93821f 100644 --- a/js/id/renderer/background_source.js +++ b/js/id/renderer/background_source.js @@ -40,7 +40,8 @@ iD.BackgroundSource.Bing = function(data, dispatch) { var bing = iD.BackgroundSource.template(data), key = 'Arzdiw4nlOJzRwOz__qailc8NiR31Tt51dN2D7cm57NrnceZnCpgOkmJhNpGoppU', // Same as P2 and JOSM - url = 'http://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?include=ImageryProviders&key=' + key + '&jsonp={callback}', + url = 'http://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?include=ImageryProviders&key=' + + key + '&jsonp={callback}', providers = []; d3.jsonp(url, function(json) { @@ -51,7 +52,7 @@ iD.BackgroundSource.Bing = function(data, dispatch) { return { zoom: [area.zoomMin, area.zoomMax], extent: iD.geo.Extent([area.bbox[1], area.bbox[0]], [area.bbox[3], area.bbox[2]]) - } + }; }) }; }); @@ -65,7 +66,7 @@ iD.BackgroundSource.Bing = function(data, dispatch) { return extent.intersects(area.extent) && area.zoom[0] <= zoom && area.zoom[1] >= zoom; - }) + }); }).map(function(provider) { return provider.attribution; }).join(', '); @@ -75,7 +76,8 @@ iD.BackgroundSource.Bing = function(data, dispatch) { }; iD.BackgroundSource.Custom = function() { - var template = window.prompt('Enter a tile template. Valid tokens are {z}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme.'); + var template = window.prompt('Enter a tile template. ' + + 'Valid tokens are {z}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme.'); if (!template) return null; return iD.BackgroundSource.template({ template: template, diff --git a/js/id/ui/attribution.js b/js/id/ui/attribution.js index 4cc50b48c..f06b04972 100644 --- a/js/id/ui/attribution.js +++ b/js/id/ui/attribution.js @@ -13,7 +13,7 @@ iD.ui.Attribution = function(context) { var source = d.data.sourcetag || d.data.name; if (d.data.logo) { - source = '' + source = ''; } var desc = t('imagery.provided_by', {source: source});