diff --git a/README.md b/README.md index 8e4475b..ab85f9c 100644 --- a/README.md +++ b/README.md @@ -42,15 +42,14 @@ npm i places-autocomplete-svelte@1.0.1 ```svelte @@ -65,52 +64,52 @@ npm i places-autocomplete-svelte@1.0.1 - `countries`: Use countries property to refine search by region - `placeholder`: Use the placeholder property to customize the input field's placeholder text. - `autocomplete`: Use to disable the HTML `` autocomplete attribute. -- `requestParams` (autocomplete request): - - `language`: Use the language property to set the language of the autocomplete results. - - `region`: Use the region property to bias the results toward a particular region. If the countries array is provided the region will be used from the selected country. -- `fetchFields`: Use to control the Place response +- `requestParams` (optional [AutocompleteRequest properties](https://developers.google.com/maps/documentation/javascript/reference/autocomplete-data#AutocompleteRequest) ): + - `language`: in which to return results. If ommited defaults to `en-GB`. [See details](https://developers.google.com/maps/documentation/javascript/reference/autocomplete-data#AutocompleteRequest.language) + - `region`: the [CLDR two-character format](https://developers.google.com/maps/documentation/javascript/reference/autocomplete-data#AutocompleteRequest). Defaults to `GB`. If the countries array is provided the coutries region overwrites the `region` value in `requestParams`. +- `fetchFields`: Use to control the Place response. See [types](https://developers.google.com/maps/documentation/javascript/place-class-data-fields) for details. If omitted defaults to `['formattedAddress', 'addressComponents']` ```svelte - // ... other imports +// ... other imports - // Error handler - let pacError = ''; - let onError = (error: string) => { - console.error(error); - pacError = error; +// Error handler +let pacError = ''; +let onError = (error: string) => { + pacError = error; };