chore: explicitely add geojson extension when downloading a layer (#2228)

This was added by the browser I think, but let's be explicit, just in
case.

cf
https://github.com/umap-project/umap/pull/2224#pullrequestreview-2382243375
This commit is contained in:
Yohan Boniface 2024-10-24 17:47:11 +02:00 committed by GitHub
commit bda1984f44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -812,7 +812,7 @@ export class DataLayer {
this this
) )
if (this.umap_id) { if (this.umap_id) {
const filename = Utils.slugify(this.options.name) const filename = `${Utils.slugify(this.options.name)}.geojson`
const download = Utils.loadTemplate(` const download = Utils.loadTemplate(`
<a class="button" href="${this._dataUrl()}" download="${filename}"> <a class="button" href="${this._dataUrl()}" download="${filename}">
<i class="icon icon-24 icon-download"></i>${translate('Download')} <i class="icon icon-24 icon-download"></i>${translate('Download')}