Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@
</DesignTokens>
</Story>

<Story asChild name="Long input">
<DesignTokens>
<div class="container">
<Map style={SWRDataLabLight} initialLocation={{ lat: 51, lng: 10, zoom: 20 }}>
<GeocoderControl
placeholder="This is an input with a very long placeholder text"
languages="de"
service="maptiler"
key="V32kPHZjMa0Mkn6YvSzA"
/>
</Map>
</div>
</DesignTokens>
</Story>

<style>
.container {
width: 500px;
Expand Down
11 changes: 4 additions & 7 deletions components/src/maplibre/GeocoderControl/GeocoderControl.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
key: string;
/**
* Maximum number of suggestions to display
* Limit the number of returned suggestions
*/
limit?: number;
/**
Expand All @@ -24,7 +24,7 @@
*/
languages?: GeocodingLanguage | GeocodingLanguage[];
/**
* Overwrite the default input placeholder text
* Overwrite the default input placeholder
*/
placeholder?: string;
}
Expand All @@ -50,6 +50,7 @@
countries: countriesArr.join(','),
showResultsWhileTyping: true,
showResultMarkers: false,
debounceSearch: 25,
placeholder,
limit
});
Expand Down Expand Up @@ -78,7 +79,7 @@
}

.maplibregl-ctrl-geocoder--input {
width: 100%;
width: calc(100% - 3.7em);
height: 100%;
font-family: inherit;
font-size: inherit;
Expand Down Expand Up @@ -167,10 +168,6 @@
flex-direction: column;
}

.maplibregl-ctrl-geocoder--suggestion-match {
font-weight: bold;
}

.maplibregl-ctrl-geocoder--suggestion-title,
.maplibregl-ctrl-geocoder--suggestion-address,
.maplibregl-ctrl-geocoder--result-address {
Expand Down