[Fix bug 944758] Provide attribution to OpenStreetMap data. #557
Conversation
@@ -173,3 +173,9 @@ function paginatorSelector(selector) { | |||
window.location = $(this).val(); | |||
}); | |||
} | |||
|
|||
function addAttributionOSM(map) { | |||
var osmURL = 'http://openstreetmap.org'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add this to a variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added that just to keep the line length small. It can be replaced in the attribution string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point on keeping the line small but maybe just splitting the line in multiple lines is better than assigning strings to variables?
As a note to this PR, I believe we also need to add an attribution on pages where we use the static maps API? |
I dont have in mind a straightforward way to add a leaflet-like OSM contribution in static tiles. Thoughts? |
I don't think there's a way to add an attribution directly to a static map, so yes adding something to the page should be enough I think. |
|
||
{% block endrow %} | ||
<div class="end-row row attribution"> | ||
<p class="grayed"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make the attribution text line up with the grid, add the CSS classes of large-12 columns
to the <p>
element.
Also it is good to try and avoid using presentational class names (what if gray turns to blue in a future design?)
In CSS/LESS you could apply the .grayed class using a selector such as:
.attribution p {
.grayed;
}
@alexgibson PR updated |
Looking good, r+ from me on the attribution styling |
{% block endrow %} | ||
<div class="end-row row attribution"> | ||
<p class="large-12 columns"> | ||
Maps © by <a href="http://mapbox.com">Mapbox</a> and <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If is doesn't cause formating errors I'd prefer this line smaller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also since this blocked is share, it should be in separate file and included here and in view_report.html and everywhere else needed.
Since #562 was merged, do we also still need to add an attribution to the new report template? |
r+wc |
@alexgibson I added the same |
r+ 🚀 |
[Fix bug 944758] Provide attribution to OpenStreetMap data.
No description provided.