Skip to content

Commit

Permalink
Tile attribution improvements (#309)
Browse files Browse the repository at this point in the history
* Improve OSM attribution

- Use "(c) OpenStreetMap contributors" instead of "(c) OpenStreetMap"
  as suggested on https://www.openstreetmap.org/copyright
- Use https URL

* Update HOTOSM attribution

Use the same attribution as openstreetmap.org for the HOT tiles.

* Update Mapbox attribution

See https://docs.mapbox.com/help/how-mapbox-works/attribution/#text-attribution

* Update eslint-plugin-html

This fixes the following error:
   TypeError: Cannot read property 'define' of undefined
See BenoitZugmeyer/eslint-plugin-html#113

+ add node_modules to .gitignore
  • Loading branch information
rzoller authored and jieter committed Feb 6, 2019
1 parent dc03ba3 commit 29fcb51
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/node_modules
leaflet-providers.min.js
12 changes: 8 additions & 4 deletions leaflet-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
options: {
maxZoom: 19,
attribution:
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
},
variants: {
Mapnik: {},
Expand Down Expand Up @@ -114,7 +114,10 @@
HOT: {
url: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
options: {
attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'
attribution:
'{attribution.OpenStreetMap}, ' +
'Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> ' +
'hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>'
}
},
BZH: {
Expand Down Expand Up @@ -238,8 +241,9 @@
url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}{r}.png?access_token={accessToken}',
options: {
attribution:
'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; ' +
'Map data {attribution.OpenStreetMap}',
'<a href="https://www.mapbox.com/about/maps/" target="_blank">&copy; Mapbox</a> ' +
'{attribution.OpenStreetMap} ' +
'<a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>',
subdomains: 'abcd',
id: 'mapbox.streets',
accessToken: '<insert your access token here>',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"devDependencies": {
"chai": "^4.1.2",
"eslint": "^5.4.0",
"eslint-plugin-html": "^4.0.5",
"eslint-plugin-html": "^5.0.3",
"mocha": "^5.2.0",
"mocha-chrome": "^1.1.0",
"mversion": "^1.12.0",
Expand Down

0 comments on commit 29fcb51

Please sign in to comment.