diff --git a/src/lib/common/Geocoder.svelte b/src/lib/common/Geocoder.svelte index d35d128e..f92a6b6f 100644 --- a/src/lib/common/Geocoder.svelte +++ b/src/lib/common/Geocoder.svelte @@ -12,13 +12,24 @@ let mapController: MapController; - // TODO HMR is broken onMount(() => { - mapController = createMapLibreGlMapController($map, maplibregl); + let marker = true; + let showResultMarkers = true; + let flyToOptions = { + duration: 1000, + }; + let fitBoundsOptions = { + duration: 1000, + }; + mapController = createMapLibreGlMapController( + $map, + maplibregl, + marker, + showResultMarkers, + flyToOptions, + fitBoundsOptions, + ); }); - - // TODO Show markers - // TODO Set the flyTo duration {#if mapController} @@ -27,6 +38,11 @@ {mapController} apiKey={import.meta.env.VITE_MAPTILER_API_KEY} country="gb" + proximity={[ + { + type: "map-center", + }, + ]} /> {/if}