HSLdevcom / digitransit-ui

Digitransit UI ("Reittiopas.fi")
https://www.reittiopas.fi/
Other
239 stars 131 forks source link

[next] No way to use a custom map attribution #3670

Closed leonardehrenfried closed 3 years ago

leonardehrenfried commented 3 years ago

We are following the next branch to build up a digitransit instance for our client. We noticed that there is a config option showOSMCopyright but unfortunately we need a more complex attribution where we can define the text being shown.

The background for this change is that we use a few data providers and each of these must be credited.

Would you be interested in a PR that allows you to set the attribution text?

I can image the following way of specifying it in the config file:

map {
  attribution: false // no attribution
  attribution: "&copy; <a tabindex=&quot;-1&quot; href=&quot;http://osm.org/copyright&quot;>OpenStreetMap</a>" // default attribution
  attribution: "© <a tabindex=-1 href=http://osm.org/copyright>OpenStreetMap Mitwirkende</a>, <a tabindex=-1 href=https://www.nvbw.de/aufgaben/digitale-mobilitaet/open-data/>Datensätze der NVBW GmbH</a> und <a tabindex=-1 href=https://www.openvvs.de/dataset/gtfs-daten>VVS GmbH</a>" // what we need
}

What do you think?

vesameskanen commented 3 years ago

Hi, Leonard

Sounds good to me, go ahead!

For your information, the focus in the next development has been strongly in one single 'HSL' instance, which will be releases in very near future. I expect that after the release, the new code base will be developed towards more flexible and generic direction by the digitransit team. Your contribution fits that well.

leonardehrenfried commented 3 years ago

Closed by #3687