# Filter by Location

### Search by Location

In this section, you can enable showing the search results by filtering the particular location. To enable this option, turn on the Show Location/Include Location in Filter option. The option sorts the listings by selected location.

{% hint style="info" %}
The Filter by location option **is not available** on the **Aircrafts** and **Equipment** layouts.
{% endhint %}

<figure><img src="https://2954064479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDP3ivYPbpYO9Rs_wuB%2Fuploads%2FEJ9uxA8p0ElYtxHAIqgX%2Flocation%201.jpg?alt=media&#x26;token=6c3a49cd-6a54-41cb-88f7-7fafb61822d5" alt=""><figcaption></figcaption></figure>

On the **Unit Measurement** field indicate the unit measurement for distance and enter the search radius on the **Set Max Search Radius** section.&#x20;

<figure><img src="https://2954064479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDP3ivYPbpYO9Rs_wuB%2Fuploads%2FqezGcLFA2RgIrAanbLbu%2FMotors%205.17%20-%20Theme%20options%20Filter%20by%20Location%20in%20Inventory.png?alt=media&#x26;token=00938d25-ffab-4e99-9bec-dead51041b5e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**For the Filter by location option, the Google Map API Key should be entered on the  Theme Options > General > Google API Key field.** Read [this doc from Google](https://developers.google.com/maps/documentation/javascript/get-api-key) to learn more about finding Google Map API Key.
{% endhint %}

You can enable showing the recommendations of other listings if there are no results available in this search intent. To do this, enable **Recommend items in other locations in case of empty result option.**&#x20;

<figure><img src="https://2954064479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDP3ivYPbpYO9Rs_wuB%2Fuploads%2FQEPSCsjEt2XympgvczUE%2Flocation%203.jpg?alt=media&#x26;token=2fe40708-0f3f-4486-a7b9-371bf57bd5ae" alt=""><figcaption></figcaption></figure>

This is how it will look for your users:

<figure><img src="https://2954064479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDP3ivYPbpYO9Rs_wuB%2Fuploads%2FdrZiQVUwGsBmN2QJ1sF6%2Flocation%206.jpg?alt=media&#x26;token=374dd70f-ab05-494b-bed7-a64b6b8c7858" alt=""><figcaption></figcaption></figure>

### **Search by Distance**

You can allow your users to filter based on the radius of the location. To do this, turn on the **Distance search.**

<figure><img src="https://2954064479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDP3ivYPbpYO9Rs_wuB%2Fuploads%2FUhtVZcJELgSvygYOmnDB%2Flocation%202.jpg?alt=media&#x26;token=98da1554-26cc-4482-9267-611d2bfe969f" alt=""><figcaption></figcaption></figure>
