<LanguageMap> proper disable of default attribution (we extend it with custom attributions)

This commit is contained in:
Valentyne Stigloher 2024-05-26 14:56:06 +02:00
parent 6c6e9f0866
commit 7cbf78f18e

View File

@ -33,7 +33,7 @@ export default dark.extend({
'https://tinyworldmap.com/dist/v3/tiny-world-borders.js',
);
var map = window.L.map('map').setView([45, 15], 3);
var map = window.L.map('map', { attributionControl: false }).setView([45, 15], 3);
// alternatively, for full-width map:
// typeof(window) !== 'undefined' && window.innerWidth < MOBILE_BREAKPOINT
@ -64,13 +64,6 @@ export default dark.extend({
window.open(locale.url);
});
}
// attribution gets added twice somehow, remove the duplicate
// TODO proper fix
const attribution = this.$el.querySelectorAll('.leaflet-control-attribution');
if (attribution.length > 1) {
attribution[1].remove();
}
},
});
</script>