From d2c8ea15fd820314cdbd9f4345825d76ebd45f0d Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 21 Oct 2013 13:28:09 -0700 Subject: [PATCH] Legend for GPS overlay layer --- data/imagery.json | 1 + data/update_imagery.js | 3 +++ js/id/ui/attribution.js | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/data/imagery.json b/data/imagery.json index 2951ce37c..5a931e80d 100644 --- a/data/imagery.json +++ b/data/imagery.json @@ -13959,6 +13959,7 @@ ], "terms_url": "http://www.openstreetmap.org/copyright", "terms_text": "© OpenStreetMap contributors", + "terms_html": "© OpenStreetMap contributors. North: South: East: West: ", "overlay": true }, { diff --git a/data/update_imagery.js b/data/update_imagery.js index 920436166..380b7e22e 100644 --- a/data/update_imagery.js +++ b/data/update_imagery.js @@ -71,6 +71,9 @@ sources.forEach(function(source) { if (attribution.text) { im.terms_text = attribution.text; } + if (attribution.html) { + im.terms_html = attribution.html; + } ['id', 'default', 'overlay'].forEach(function(a) { if (source[a]) { diff --git a/js/id/ui/attribution.js b/js/id/ui/attribution.js index f8dd6bee4..f65590df9 100644 --- a/js/id/ui/attribution.js +++ b/js/id/ui/attribution.js @@ -16,6 +16,12 @@ iD.ui.Attribution = function(context) { .append('span') .attr('class', 'attribution') .each(function(d) { + if (d.terms_html) { + d3.select(this) + .html(d.terms_html); + return; + } + var source = d.terms_text || d.id || d.name; if (d.logo) {