Add a powered by uMap footer

Fix #1304
This commit is contained in:
David Larlet 2023-09-08 17:16:42 -04:00
parent 2152ca3d1a
commit f535993201
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD

View file

@ -1130,14 +1130,10 @@ L.U.Map.include({
toggleCaveat()
const download = L.DomUtil.create('a', 'button', container)
download.textContent = L._('Download data')
L.DomEvent.on(
download,
'click',
() => {
L.DomEvent.on(download, 'click', () => {
if (typeInput.value === 'umap') this.fullDownload()
else this.download(typeInput.value)
}
)
})
this.ui.openPanel({ data: { html: container } })
},
@ -1263,6 +1259,15 @@ L.U.AttributionControl = L.Control.Attribution.extend({
const home = L.DomUtil.add('a', '', this._container, `${L._('Home')}`)
home.href = '/'
}
if (this._map.options.captionMenus) {
const poweredBy = L.DomUtil.add(
'a',
'',
this._container,
`${L._('Powered by uMap')}`
)
poweredBy.href = 'https://github.com/umap-project/umap/'
}
},
})