> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/map.md).

# Map

Step-by-step tutorials for the Avonni Map in screen flows, from colored pins and clickable accounts to search, routes and drawn territories.

The [Map](https://docs.avonnicomponents.com/flow/flow-components/map.md) puts Salesforce records on a map inside a screen flow and lets users act on them. These tutorials follow one example throughout: a field sales team and its San Francisco accounts.

{% hint style="info" %}
New to the component? Start with [Customize the Map Marker](https://docs.avonnicomponents.com/flow/tutorials/components/map/customize-the-map-marker.md): it builds the screen flow every other tutorial starts from.
{% endhint %}

## Show your records

Put accounts on the map in a way a rep reads at a glance, then show the details of the one they click.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Customize the Map Marker</strong></td><td>Color each account's pin by its Rating so a field rep spots hot accounts at a glance, then try the other five marker shapes and your own SVG icon.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FaIN450GNsTHpgErCxq8T%2Fmaptuto-card-customize-the-map-marker.png?alt=media">maptuto-card-customize-the-map-marker.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/map/customize-the-map-marker.md">Customize the Map Marker</a></td></tr><tr><td><strong>Create a Clickable Map with Account Details</strong></td><td>Build a screen where a rep clicks an account's pin and its details appear beside the map, then let the same click open a panel to log a visit.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FBrlZBZvbfxnPLpp94RVu%2Fmaptuto-card-create-a-clickable-map-with-details-information.png?alt=media">maptuto-card-create-a-clickable-map-with-details-information.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/projects/create-a-clickable-map-with-details-information.md">Create a Clickable Map with Account Details</a></td></tr><tr><td><strong>Filter a Data Table or Map by the current record in a screen flow</strong></td><td>Show only the current record's Cases or Contacts in an Avonni Data Table or Map, with a recordId query filter in your screen flow.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FoSb8luXRbb157dDEyngh%2Frecordid-cover-filter-a-data-table-or-map-by-the-current-record.png?alt=media">recordid-cover-filter-a-data-table-or-map-by-the-current-record.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/tips-and-tricks/filter-a-data-table-or-map-by-the-current-record.md">Filter a Data Table or Map by the current record in a screen flow</a></td></tr></tbody></table>

## Help users find what they need

Narrow dozens of pins to the few that matter, from menus or from the area on screen.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Add Search and Filters to a Map</strong></td><td>Add a search bar and Industry and Rating filter menus to an Avonni Map, in a side panel, so reps find the right accounts among dozens of pins.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FeOiskKVvJGb8mfp6LV12%2Fmaptuto-card-add-search-and-filters.png?alt=media">maptuto-card-add-search-and-filters.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/map/add-search-and-filters.md">Add Search and Filters to a Map</a></td></tr><tr><td><strong>Interactive Map Filtering</strong></td><td>Build a screen flow where four Avonni Metrics recount the accounts in view each time a rep pans or zooms the Avonni Map.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F0CZPyynndM6fCbkjYrny%2Fmaptuto-card-interactive-map-filtering.png?alt=media">maptuto-card-interactive-map-filtering.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/projects/interactive-map-filtering.md">Interactive Map Filtering</a></td></tr></tbody></table>

## Act on the map

Let users change data from the map itself: move a site, plan a day of visits, draw a territory.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Drag a Pin to Update a Location</strong></td><td>Let a service dispatcher drag a misplaced customer site to its real entrance on the map, then save the new latitude and longitude with Update Records.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fq7eedWqX8mK33N2YD5Fz%2Fmaptuto-card-drag-a-pin-to-update-a-location.png?alt=media">maptuto-card-drag-a-pin-to-update-a-location.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/map/drag-a-pin-to-update-a-location.md">Drag a Pin to Update a Location</a></td></tr><tr><td><strong>Plan a Route from the Map</strong></td><td>Let a field rep pick tomorrow's accounts on an Avonni Map in a screen flow, optimize the stop order, calculate the route and start navigation.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FXIGZSFWvNjotySHzPPdA%2Fmaptuto-card-plan-a-route.png?alt=media">maptuto-card-plan-a-route.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/map/plan-a-route.md">Plan a Route from the Map</a></td></tr><tr><td><strong>Draw a Territory and Save It to the Record</strong></td><td>Let a sales manager draw a territory on an Avonni Map in a screen flow, save it as a file on the account, and reopen it later to edit.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FYOkO5W5Eec1lowJVaX4r%2Fmaptuto-card-draw-a-territory.png?alt=media">maptuto-card-draw-a-territory.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/map/draw-a-territory.md">Draw a Territory and Save It to the Record</a></td></tr></tbody></table>

Want every setting in one place? See the [Map](https://docs.avonnicomponents.com/flow/flow-components/map.md) reference. Routing needs a one-time setup: [Enable Map Routing](https://docs.avonnicomponents.com/flow/flow-components/map/enable-map-routing.md).


---

# 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.avonnicomponents.com/flow/tutorials/components/map.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.
