mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Legend for GPS overlay layer
This commit is contained in:
@@ -13959,6 +13959,7 @@
|
||||
],
|
||||
"terms_url": "http://www.openstreetmap.org/copyright",
|
||||
"terms_text": "© OpenStreetMap contributors",
|
||||
"terms_html": "© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap contributors</a>. North: <span style='display: inline-block; width: 10px; height: 10px; background-color: #7fed11;'></span> South: <span style='display: inline-block; width: 10px; height: 10px; background-color: #7f11ed;'></span> East: <span style='display: inline-block; width: 10px; height: 10px; background-color: #ff3f3f;'></span> West: <span style='display: inline-block; width: 10px; height: 10px; background-color: #00bfbf;'></span>",
|
||||
"overlay": true
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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]) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user