acdh-oeaw / dhcr-main

Digital Humanities Course Registry Application
https://dhcr.clarin-dariah.eu/
Apache License 2.0
3 stars 0 forks source link

Add Mapbox attribution to map on main page #78

Closed patrickakk closed 11 months ago

patrickakk commented 1 year ago

The current map on the main page uses styles hosted on Mapbox. According their documentation, attribution is required: https://docs.mapbox.com/help/getting-started/attribution/

Maps using Mapbox map styles or data supplied by Mapbox must display both the Mapbox logo and text attribution.

Mapbox requires two types of attribution: a logo and text attribution. Mapbox logo

The Mapbox logo is a small image containing the stylized word "Mapbox". It typically resides on the bottom left corner of a map. While you may move the logo to a different corner of the map, we require the Mapbox logo to appear on our maps so that Mapbox and its maps get proper credit. Text attribution

The text attribution contains at least three links: © Mapbox, © OpenStreetMap and Improve this map. You must properly attribute and link Mapbox and OpenStreetMap when using the Mapbox Streets tileset. Some other Mapbox-provided tilesets require additional attribution which is stored in the TileJSON of the tileset. If you are using Mapbox software to render a map based entirely on data from a non-Mapbox source, you may omit the text attribution but must still display the Mapbox logo.

patrickakk commented 1 year ago

As well the map on the main pages uses Leaflet:

Other mapping frameworks

If you are using Mapbox maps with another open source library, like Leaflet or OpenLayers, the Mapbox logo and attribution are still required. These libraries may not automatically add necessary attribution, so you'll need to add it yourself. To get the Mapbox logo in various formats and styles, download the Mapbox logo file on our Press page.

patrickakk commented 1 year ago

@vronk FYI, see above.

@PixlTracer @IvdL22

Can you review this?

Available at the "main page" in test: https://test-dhcr.clarin-dariah.eu/

IvdL22 commented 1 year ago

@patrickakk Sorry, Patrick, I am sorry, how exactly do I need to test/review this? I see the attribution and the map seems to work fine.

patrickakk commented 1 year ago

@IvdL22 Yes, it's only about the attribution. The quotes and link in the first comment of this issue explain that attribution is required when using their services. The attribution was not added to the application in the past.

I've tried to implement it in the way described in the documentation.

Please let me know when something is missing and maybe ask others involved in the project as well @PixlTracer @vronk .

If we all agree that it's implemented the way it should, then we can mark this issue as "Done" ?

PixlTracer commented 12 months ago

checked the map and it is fine, the logo and the mini text are not bothering at all;

one minor thing: when entering the main page in dev, the map is cropped (see screenshot below); can the map be 'more zoomed in'? then the grey cropping disappears; (if this cannot be resolved easily, please close the issue) Bildschirmfoto 2023-09-12 um 16 38 32

patrickakk commented 11 months ago

@PixlTracer I've created a separate issue for this question, since that might require some more investigating.

Then we can close this issue and release the version.

patrickakk commented 11 months ago

Implemented in 2023-09.