Skip to content

Commit 265db88

Browse files
committed
feat(leaflet): update tile layer url and add attribution overlay
1 parent d397ddf commit 265db88

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

client/scripts/directives/sbLeafletMap.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ require('../app').directive('sbLeafletMap', /* @ngInject */function () {
4242
maxZoom: 19
4343
}
4444

45-
const mapOptions = { scrollWheelZoom: false }
45+
const mapOptions = {
46+
scrollWheelZoom: false,
47+
attributionControl: true
48+
}
4649

4750
map = leaflet.map(mapEl, mapOptions).setView(initialCenter, ctrl.zoom || 8)
48-
leaflet.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', tileLayerOptions).addTo(map)
51+
map.attributionControl.setPrefix(false)
52+
leaflet.tileLayer('https://tiles.smartbirds.org/{z}/{x}/{y}.png', tileLayerOptions).addTo(map)
4953

5054
mapEl.addEventListener('wheel', function (e) {
5155
if (!e.ctrlKey) return

0 commit comments

Comments
 (0)