diff --git a/.prettierrc b/.prettierrc index 40859f0..ca43d6f 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,5 @@ { - "plugins": ["prettier-plugin-svelte"], - "pluginSearchDirs": ["."], - "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] + "plugins": ["prettier-plugin-svelte"], + "pluginSearchDirs": ["."], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] } diff --git a/demo.html b/demo.html index 71a0685..b45fb07 100644 --- a/demo.html +++ b/demo.html @@ -34,6 +34,7 @@ const gc = new maptilerGeocoding.GeocodingControl({ apiKey: "0iOk4fgsz9fOXyDYCirE", + maplibregl, }); map.addControl(gc); diff --git a/index.html b/index.html index b5b1252..c6bbf66 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,6 @@ - Vite + Svelte + TS diff --git a/src/App.svelte b/src/App.svelte index be0e7ff..b9f1c83 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,29 +1,30 @@
diff --git a/src/assets/svelte.svg b/src/assets/svelte.svg deleted file mode 100644 index c5e0848..0000000 --- a/src/assets/svelte.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/lib/Geocoding.svelte b/src/lib/Geocoding.svelte index 62cc74a..670c29a 100644 --- a/src/lib/Geocoding.svelte +++ b/src/lib/Geocoding.svelte @@ -1,12 +1,52 @@
@@ -162,14 +256,15 @@ on:focus={() => (focused = true)} on:blur={() => (focused = false)} on:keydown={handleKeyDown} + on:input={handleInput} type="search" - placeholder="Search" - aria-label="Search" + {placeholder} + aria-label={placeholder} /> - {#if focusedDelayed && features.length > 0} + {#if focusedDelayed && listFeatures.length > 0}