attribution

This commit is contained in:
msramalho
2022-03-15 10:44:31 +01:00
parent 28cb2f468d
commit 400adc61f6
2 changed files with 167 additions and 134 deletions

View File

@@ -101,7 +101,15 @@ class Map extends React.Component {
.setView(mapConfig.anchor, mapConfig.startZoom)
.setMinZoom(mapConfig.minZoom)
.setMaxZoom(mapConfig.maxZoom)
.setMaxBounds(mapConfig.maxBounds);
.setMaxBounds(mapConfig.maxBounds)
;
// This assumes your map is the constant 'map'
map.attributionControl.addAttribution(`<a href="http://mapbox.com/about/maps" class='mapbox-logo' target="_blank">Mapbox</a>© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>`);
// const credits = L.control.attribution({position: 'bottomleft'}).addTo(map);
// credits.addAttribution(`<a href="http://mapbox.com/about/maps" class='mapbox-logo' target="_blank">Mapbox</a>`)
// credits.addAttribution(
// `© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>`
// Initialize supercluster index
this.superclusterIndex = new Supercluster(clusterConfig);

File diff suppressed because one or more lines are too long