top | item 38437190

(no title)

chandlerswift | 2 years ago

Would you please add an OpenStreetMap attribution[0]? It looks like you're using OSM data via OpenRailwayMap (which also requires its own attribution[1]) and Carto basemaps (which I'm not terribly familiar with, but at first glance appear to be based on OSM data[2])---each of which detail their respective attribution requirements.

Leaflet makes this incredibly simple; just add the suggested text to the attribution field when you initialize the layers:

        L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', {
            maxZoom: 19,
            attribution: '' // here!
        }).addTo(map);
        var railwayOverlay = L.tileLayer('https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png', {
            attribution: '', // and here!
        }).addTo(map);
[0]: https://www.openstreetmap.org/copyright

[1]: https://wiki.openstreetmap.org/wiki/OpenRailwayMap/API

[2]: https://drive.google.com/file/d/1P7bhSE-N9iegI398QYDjKeVhnbS... via https://carto.com/legal

discuss

order