progress with layer settings

This commit is contained in:
vcoppe
2024-05-04 23:50:27 +02:00
parent 35b0adc7e5
commit b3d016e2af
10 changed files with 272 additions and 145 deletions

View File

@@ -8,15 +8,11 @@
let container: HTMLDivElement | null = null;
$: if ($map && container) {
$map.on('load', () => {
if ($map && container) {
if (position.includes('right')) container.classList.add('float-right');
else container.classList.add('float-left');
container.classList.remove('hidden');
let control = new CustomControl(container);
$map.addControl(control, position);
}
});
if (position.includes('right')) container.classList.add('float-right');
else container.classList.add('float-left');
container.classList.remove('hidden');
let control = new CustomControl(container);
$map.addControl(control, position);
}
</script>