Hi everybody,
I would like to limit the address component to 2 or 3 cities in Belgium.
Is it possible?
Thank you in advance.
Katia
Hi Katia,
The address component uses google address autocomplete. This means you can configure the component to constrain the autocomplete results using the "provider options". Here are some examples of how you could use these settings to constrain the available addresses however I recommend having a read on googles official documentation if you need something more specific.
Example 1 - Constrain address autocomplete to Belgium
Open the component settings for the address component and navigate to the "Provider" tab
Locate the Provider Options property and enter the following option in JSON format
{ "componentRestrictions": { "country": "BE" } }
Example 2 - Constrain address to specific area using bounding box
Open the component settings for the address component and navigate to the "Provider" tab
Locate the Provider Options property and enter the following option in JSON format
{ "bounds":{ "north": 50.952531, "south": 50.752531, "east": 4.452764, "west": 4.252764 } }
Here is an example of the end result:
Hi Katia,
The address component uses google address autocomplete. This means you can configure the component to constrain the autocomplete results using the "provider options". Here are some examples of how you could use these settings to constrain the available addresses however I recommend having a read on googles official documentation if you need something more specific.
Example 1 - Constrain address autocomplete to Belgium
Open the component settings for the address component and navigate to the "Provider" tab
Locate the Provider Options property and enter the following option in JSON format
{ "componentRestrictions": { "country": "BE" } }
Example 2 - Constrain address to specific area using bounding box
Open the component settings for the address component and navigate to the "Provider" tab
Locate the Provider Options property and enter the following option in JSON format
{ "bounds":{ "north": 50.952531, "south": 50.752531, "east": 4.452764, "west": 4.252764 } }
Here is an example of the end result: