> For the complete documentation index, see [llms.txt](https://docs.gridmate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gridmate.io/product-tour/maps/map-list/filters-and-search.md). Agents can also search and read this documentation through its [MCP server](https://docs.gridmate.io/~gitbook/mcp).

# Filters & Search

Search around a location, filter the records and search the list of a GM - Map List.

These settings control which records users find on the map: around a location, by filter, or by search. They are set on the **GM - Map List** component, in the Lightning App Builder.

## Which setting do I need?

| I want to…                                                 | Use                                                                                                                                |
| ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Let users find the records around any location             | [Search Around](#search-around)                                                                                                    |
| Let users filter the map with the Quick or Advanced filter | The **Enable Filtering** property, on the [Set up](https://docs.gridmate.io/product-tour/maps/map-list/set-up.md#properties) page  |
| Add a search box to the list                               | The **Search Fields** property, on the [Set up](https://docs.gridmate.io/product-tour/maps/map-list/set-up.md#properties) page     |
| Load only some records on the map                          | The **Filter** property, on the [Set up](https://docs.gridmate.io/product-tour/maps/map-list/set-up.md#configuration-example) page |

## Search Around

GridMate's **Search Around** is a smart and intuitive feature that lets you explore any location anywhere on the map and discover the configured points of interest within a given radius.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FGOFFO3X3w99duqkl17Q4%2FScreenshot%202025-06-13%20at%2015.09.34.png?alt=media&#x26;token=6b394ab1-8dda-455d-9a11-b134d383752b" alt=""><figcaption></figcaption></figure>

### Set it up

Paste the JSON in the **Search Around** property of the **GM - Map List** component in the App Builder. Below is an example of the **Search Around** configuration used on the video below. For search around, we use GeoApify with maximum radius of 500km.

```json
{
    "unit": "km",
    "distance": "500",
    "autoComplete": {
        "autoCompleteHandler": "GeoApifyAutoCompleteHandler"
    }
}
```

{% hint style="success" %}
Use `"unit": "mi"` to use miles instead of kilometers. The around search unit could be **km** or **mi**.
{% endhint %}

### How to use it

1. Click the location box on the map and enter a location.
2. Adjust the radius. As the radius grows, the records of that zone appear on the map.
3. Switch between kilometers and miles if needed.
4. View or edit the records that were found.

After configuring the **Search Around** property, you're ready to begin using it. The video below provides a detailed, step-by-step tutorial on how to use the **Search Around** within a GM - Map List.

{% embed url="<https://youtu.be/a-YNYkDubo0>" %}
**Search Around**
{% endembed %}

### Slider range

The distance slider runs from `minDistance` to `distance` in `stepDistance` increments.

<table><thead><tr><th width="260.8194580078125">Key</th><th width="203.861083984375">Default</th><th>Description</th></tr></thead><tbody><tr><td><code>distance</code></td><td>—</td><td>Maximum distance (slider end)</td></tr><tr><td><code>minDistance</code></td><td><code>10</code></td><td>Minimum distance (slider start)</td></tr><tr><td><code>stepDistance</code></td><td><code>5</code></td><td>Slider increment</td></tr></tbody></table>

```json
{
    "unit": "mi",
    "distance": "100",
    "minDistance": 1,
    "stepDistance": 1,
    "autoComplete": {
        "autoCompleteHandler": "GeoApifyAutoCompleteHandler"
    }
}
```

### Target entities

`targetEntities` lists the objects the location picker can search. With a single entry, `defaultValue` centers the map on that record as soon as the component loads.

<table><thead><tr><th width="260">Key</th><th>Description</th></tr></thead><tbody><tr><td><code>objectName</code></td><td>Object API name</td></tr><tr><td><code>objectLabel</code></td><td>Label shown in the picker</td></tr><tr><td><code>titleField</code></td><td>Field used as the marker title</td></tr><tr><td><code>subTitleField</code></td><td>Field used as the marker subtitle</td></tr><tr><td><code>iconName</code></td><td>SLDS icon, e.g. <code>standard:account</code></td></tr><tr><td><code>latitudeField</code></td><td>Geolocation latitude field</td></tr><tr><td><code>longitudeField</code></td><td>Geolocation longitude field</td></tr><tr><td><code>defaultValue</code></td><td>Record Id to center on — accepts the placeholders below</td></tr><tr><td><code>defaultDistance</code></td><td>Initial radius when <code>defaultValue</code> is set</td></tr><tr><td><code>keyPrefix</code></td><td>Object key prefix of <code>defaultValue</code> (optional — derived from the Id when omitted)</td></tr></tbody></table>

```json
{
    "unit": "km",
    "distance": "500",
    "targetEntities": [
        {
            "objectName": "Account",
            "objectLabel": "Account",
            "titleField": "Name",
            "subTitleField": "Website",
            "iconName": "standard:account",
            "latitudeField": "BillingLatitude",
            "longitudeField": "BillingLongitude",
            "defaultValue": "$recordId",
            "defaultDistance": 50
        }
    ]
}
```

### Placeholders

<table><thead><tr><th width="260">Placeholder</th><th>Resolves to</th></tr></thead><tbody><tr><td><code>$recordId</code></td><td>Id of the host record</td></tr><tr><td><code>$record.FieldApiName</code></td><td>Value of that field on the host record (direct fields only)</td></tr></tbody></table>

Use `$record.FieldApiName` when the map lives on one object but should center on a related record — for example a Map List on the Opportunity page centered on its Account:

```json
"defaultValue": "$record.AccountId"
```

{% hint style="info" %}
The picker derives the target object from the first three characters of the resolved Id. Set `keyPrefix` explicitly when the Id comes from a polymorphic or custom-object field.
{% endhint %}

## Next steps

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Actions</strong></td><td>Add actions on one record and on the selected records.</td><td><a href="https://docs.gridmate.io/product-tour/maps/map-list/actions.md">Actions</a></td></tr><tr><td><strong>Map List</strong></td><td>Map many records of any object, filter them in a list and run actions.</td><td><a href="https://docs.gridmate.io/product-tour/maps/map-list.md">Map List</a></td></tr><tr><td><strong>GM - Map List</strong></td><td>Every property of the component.</td><td><a href="https://docs.gridmate.io/package-reference/components-library/maps/gm-map-list.md">GM - Map List</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.gridmate.io/product-tour/maps/map-list/filters-and-search.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
