Fix #2024 (or at least: workaround). The main map will now automatically recover from contextLost-events

This commit is contained in:
Pieter Vander Vennet 2024-07-16 16:00:11 +02:00
parent 7d678d95c7
commit 7d0816219f
3 changed files with 35 additions and 4 deletions

View file

@ -213,7 +213,7 @@
<main>
<div class="absolute top-0 left-0 h-screen w-screen overflow-hidden">
<MaplibreMap map={maplibremap} mapProperties={mapproperties} />
<MaplibreMap map={maplibremap} mapProperties={mapproperties} autorecovery={true}/>
</div>
{#if $visualFeedback}
@ -286,9 +286,11 @@
on:keydown={forwardEventToMap}
htmlElem={openCurrentViewLayerButton}
>
<div class="w-8 h-8 cursor-pointer">
<ToSvelte
construct={() => currentViewLayer.defaultIcon().SetClass("w-8 h-8 cursor-pointer")}
construct={() => currentViewLayer.defaultIcon()}
/>
</div>
</MapControlButton>
{/if}
<ExtraLinkButton {state} />