mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-27 10:22:35 +02:00
Merge pull request #337 from systemed/update-attribution
Update attribution when background changes
This commit is contained in:
+1
-1
@@ -206,7 +206,7 @@ window.iD = function(container) {
|
||||
.attr('class','pad1 fillD about-block link-list')
|
||||
.html("<li><a target='_blank' href='http://github.com/systemed/iD'>view code</a></li> " +
|
||||
"<li><a target='_blank' href='http://github.com/systemed/iD/issues'>report a bug</a></li>" +
|
||||
" <li>imagery <a target='_blank' href='http://opengeodata.org/microsoft-imagery-details'>provided by bing</a></li>");
|
||||
" <li id='attribution'>imagery <a target='_blank' href='http://opengeodata.org/microsoft-imagery-details'>provided by bing</a></li>");
|
||||
|
||||
var contributors = about.append('div')
|
||||
.attr('id', 'user-list')
|
||||
|
||||
@@ -3,7 +3,8 @@ iD.layerswitcher = function(map) {
|
||||
sources = [{
|
||||
name: 'Bing',
|
||||
source: iD.BackgroundSource.Bing,
|
||||
description: 'Satellite imagery.'
|
||||
description: 'Satellite imagery.',
|
||||
link: 'http://opengeodata.org/microsoft-imagery-details'
|
||||
}, {
|
||||
name: 'TIGER 2012',
|
||||
source: iD.BackgroundSource.Tiger2012,
|
||||
@@ -11,11 +12,13 @@ iD.layerswitcher = function(map) {
|
||||
}, {
|
||||
name: 'OSM',
|
||||
source: iD.BackgroundSource.OSM,
|
||||
description: 'The default OpenStreetMap layer.'
|
||||
description: 'The default OpenStreetMap layer.',
|
||||
link: 'http://www.openstreetmap.org/'
|
||||
}, {
|
||||
name: 'MapBox',
|
||||
source: iD.BackgroundSource.MapBox,
|
||||
description: 'Satellite and Aerial Imagery'
|
||||
description: 'Satellite and Aerial Imagery',
|
||||
link: 'http://mapbox.com'
|
||||
}, {
|
||||
name: 'Custom',
|
||||
source: iD.BackgroundSource.Custom,
|
||||
@@ -92,6 +95,9 @@ iD.layerswitcher = function(map) {
|
||||
.classed('selected', function(d) {
|
||||
return d.source === map.background.source();
|
||||
});
|
||||
d3.select('#attribution a')
|
||||
.attr('href', d.link)
|
||||
.text('provided by ' + d.name);
|
||||
}
|
||||
|
||||
content
|
||||
|
||||
Reference in New Issue
Block a user