Position bing logo, add attribution

This commit is contained in:
Tom MacWright
2013-03-25 15:05:30 -04:00
parent e01d2e611f
commit 5c6398e773
3 changed files with 12 additions and 5 deletions
+5
View File
@@ -1564,6 +1564,11 @@ div.combobox {
color:#fff;
}
.source-image {
height:20px;
vertical-align:top;
}
.user-list a:not(:last-child):after {
content: ', ';
}
+6 -4
View File
@@ -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,
+1 -1
View File
@@ -13,7 +13,7 @@ iD.ui.Attribution = function(context) {
var source = d.data.sourcetag || d.data.name;
if (d.data.logo) {
source = '<img src="img/' + d.data.logo + '">'
source = '<img class="source-image" src="img/' + d.data.logo + '">';
}
var desc = t('imagery.provided_by', {source: source});