> 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/experience-cloud/experience-components/ax-map.md).

# AX - Map

## Overview

**AX - Map** shows Salesforce records from any standard or custom object as markers on your Experience Sites pages, placed by address or by latitude and longitude. Site users click a marker to see the record's details or open it. Use it for store locators, service territories, event venues or customer sites.

{% hint style="success" %}
The Avonni Map is a [Reactive Data Component](https://docs.avonnicomponents.com/experience-cloud/getting-started/reactive-components.md)
{% endhint %}

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FtDbABxjI9E87N8Ee1UPB%2Fxp-quickstart-selected.png?alt=media" alt="An Experience Sites page titled Find a certified installer. Pikes Peak Power is selected in an AX - Data Table of six certified installers, its name and phone number sit above an AX - Map, and the map shows that installer&#x27;s installations around Colorado Springs."><figcaption><p>A reactive map: picking an installer in the AX - Data Table moves the AX - Map to the homes that installer has equipped.</p></figcaption></figure>

## Getting Started

A short interactive tutorial on the basics.

{% @arcade/embed url="<https://app.arcade.software/share/ZiiaXHHeJ3PWe6UcgYBN>" flowId="ZiiaXHHeJ3PWe6UcgYBN" %}

## Configuration

Select the map in Experience Builder to open its settings in the Properties Panel.

### Data Source

Connects the map to your Salesforce data.

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FRiatWpqiK5o3Yl9Fb5Np%2Fxp-quickstart-map-query.png?alt=media" alt="The AX - Map Data Source set to Query on Contact, with a filter Account ID equals {{installers.selectedRecord.Id}} and Maximum Number of Records 100, and the Data Mappings below it: Title mapped to the Title field, Description to the contact&#x27;s mailing city and department." width="340"><figcaption><p>A Query data source on Contact, filtered on the row selected in an AX - Data Table named installers.</p></figcaption></figure>

| Data Source Type | Markers                       | Best for                         |
| ---------------- | ----------------------------- | -------------------------------- |
| **Manual**       | Entered by hand.              | Fixed data, testing, demos.      |
| **Query**        | Loaded by a Salesforce query. | Live, real-time, large datasets. |

### Data Mapping

In **Data Mappings**, pick the field behind each part of a marker. **Value** identifies it (default `{{Record.Id}}`). **Location** depends on the engine:

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2F6goX71CXYFwCOEdlvpjA%2Fax-map-panel-location.png?alt=media" alt="Data Mappings of a Leaflet AX - Map that queries Accounts, in the Experience Builder panel. Title is mapped to Account Name, Description and Icon Name are empty, Type is Default. The Location group holds three fields only: Latitude mapped to Billing Latitude, Longitude to Billing Longitude and City to Billing City." width="320"><figcaption><p>On Leaflet, Location takes Latitude and Longitude, plus an optional City.</p></figcaption></figure>

| Engine          | Location fields                                                                                               |
| --------------- | ------------------------------------------------------------------------------------------------------------- |
| **Google Maps** | An address (**Street**, **City**, **State**, **Postal Code**, **Country**) or **Latitude** and **Longitude**. |
| **Leaflet**     | **Latitude** and **Longitude**, required. **City** optional, for the route's stop list and CSV.               |

<details>

<summary>Data Model Sharing with Avonni Map</summary>

Avonni Components follow your org's sharing settings and user permissions, and never change your sharing rules: a site user sees and acts on only the records they can access.

</details>

#### Filters

**Filters**: the fields site users filter markers on (menu: see Filtering & Search).

#### Search Fields

**Search Fields**: the fields the search bar searches. Requires **Show Search**.

#### Per-Marker Settings

With a **Manual** data source, each marker row has its own fields:

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FtKc6obZkqA8xOPYHvAPg%2Fmap-marker-types.png?alt=media" alt="A Leaflet map of the west side of Chicago with six markers in two rows. Top row, left to right: a red pin, a blue pin and a blue circle. Bottom row: a blue rectangle, a blue pentagon and an orange star."><figcaption><p>The six marker types on one map. Top row: Default, Pin and Circle. Bottom row: Rectangle, Polygon and Custom Icon, here a star drawn from an SVG path.</p></figcaption></figure>

| Setting                                                                                   | What it does                                                                                              |
| ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| **Title**, **Description**                                                                | Marker and popup labels.                                                                                  |
| **Icon Name**                                                                             | Marker icon.                                                                                              |
| **Type**                                                                                  | **Default**, **Circle**, **Rectangle**, **Polygon**, **Pin** or **Custom Icon**. All six on both engines. |
| **Radius**, **Bounds**, **Paths**                                                         | Shape geometry: circle radius in meters (default 25), rectangle edges, polygon points.                    |
| **Fill Color**, **Fill Opacity**, **Stroke Color**, **Stroke Opacity**, **Stroke Weight** | Shape colors.                                                                                             |
| **SVG Path**, **Scale**, **Anchor**                                                       | The **Custom Icon** drawing, with its own fill and stroke.                                                |
| **Location**, **On Select**, **On Drag**                                                  | As in the Location table above, and Interactions below.                                                   |

### Map Settings

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FuHJIaqRn5kpBR94LWCKu%2Fax-map-panel-leaflet.png?alt=media" alt="AX - Map Settings panel in Experience Builder for a map whose Type is Leaflet. From the top: API Name serviceMap, Type Leaflet, then Hide Zoom Controls, Zoom Controls Position, Zoom Level, Disable Dragging, Disable Scrollwheel Zooming, Disable Double Click Zoom, Draggable Markers, Disable Auto Pan Markers, Show Search, Header Title Service visits, the header text style, caption and icon settings, Header Is Joined. Below them eight folded sections: Header Actions, Center Location, Marker Clustering, Draw, Route, Filter, Search, Side panel." width="320"><figcaption><p>The AX - Map panel with Type set to Leaflet: the map settings, then the sections that hold the rest of the configuration.</p></figcaption></figure>

**Type** picks the engine. **Google Maps** (default): the familiar Lightning map, simplest, up to 1,000 markers. **Leaflet**: no marker cap, adds clustering, drawing and routes, places markers by coordinates only, and needs `https://tile.openstreetmap.org` in your org's Trusted Sites to load its tiles.

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FFC8ZUL0CFyjmbkZ90N8k%2Fmap-type-google.png?alt=media" alt="Five Chicago customer sites on Google Maps: four red pins near the lakeshore, from Edgewater in the north to just southwest of the Loop, and a blue circle over Hyde Park. The Map and Satellite buttons sit at the top left, the Street View and zoom controls on the right."><figcaption><p>Type set to Google Maps. The circle over Hyde Park shows that shape markers work on Google Maps too.</p></figcaption></figure>

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FtWdN4jxzZr1NVkarrN5Y%2Fmap-type-leaflet.png?alt=media" alt="The same five Chicago customer sites on a Leaflet map with OpenStreetMap tiles: four red pins near the lakeshore and a blue circle over Hyde Park. The popup of the northern pin is open and reads Northwind Traders, Andersonville office. Zoom buttons sit at the bottom right."><figcaption><p>Type set to Leaflet, on the same records. Clicking a marker opens its popup.</p></figcaption></figure>

| Setting                         | Engine      | What it does                                                               |
| ------------------------------- | ----------- | -------------------------------------------------------------------------- |
| **List Title**                  | Google Maps | Title of the location list.                                                |
| **List View**                   | Google Maps | **Visible**, **Hidden** or **Auto** (default: shown with several markers). |
| **Hide Zoom Controls**          | Both        | Removes the zoom buttons.                                                  |
| **Zoom Controls Position**      | Leaflet     | A map corner. Unset: the map decides. Hidden with **Hide Zoom Controls**.  |
| **Zoom Level**                  | Both        | Initial zoom. Unset: fits all markers.                                     |
| **Disable Dragging**            | Both        | No click-and-drag panning.                                                 |
| **Disable Scrollwheel Zooming** | Both        | No mouse-wheel zoom.                                                       |
| **Disable Double Click Zoom**   | Both        | No double-click zoom.                                                      |
| **Disable Default UI**          | Google Maps | Hides standard controls, such as Street View.                              |
| **Draggable Markers**           | Leaflet     | Site users can move markers. A drag can run **On Drag**.                   |
| **Disable Auto Pan Markers**    | Leaflet     | No auto-panning to keep markers in view.                                   |
| **Show Footer**                 | Google Maps | Footer, for data sources or a legend.                                      |
| **Show Search**                 | Both        | Search bar to find and zoom to a location.                                 |

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FCJ1OQFSHfq9r6TnEZK4J%2Fmap-list-view.png?alt=media" alt="A Google map of Chicago with five red pins and, on its right, a list titled Customer Sites (5). Each entry has a green location icon, the site name as a link and its address: Atlas Logistics, 300 W Adams St, Chicago, IL; Blue Finch Retail, 2200 N Clark St; Northwind Traders, 5300 N Clark St; Redwood Supply Co, 1800 S Halsted St; Juniper Health, 1500 E 53rd St."><figcaption><p>List View set to Visible on a Google map. Each entry in the list shows the marker title and its address.</p></figcaption></figure>

<details>

<summary>Zoom levels</summary>

1 to 22 on desktop, 1 to 20 on mobile. Roughly:

* Level 1: The entire world
* Level 5: A continent or large landmass
* Level 10: A city
* Level 15: Street-level details
* Level 20: Individual buildings

More in Google's documentation on [Zoom Levels](https://developers.google.com/maps/documentation/javascript/overview#zoom-levels).

</details>

### Header

| Setting                                                    | What it does                                                                                                                                                                                                                                     |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Header Title**, **Header Caption**                       | Text at the top of the map.                                                                                                                                                                                                                      |
| **Header Title Text Style**, **Header Caption Text Style** | A site text style for each, once its text is set.                                                                                                                                                                                                |
| **Header Icon Name**, **Header Icon Size**                 | Header icon and its size (default medium, requires the icon).                                                                                                                                                                                    |
| **Header Is Joined**                                       | Flush with the map: no rounded bottom corners or shadow.                                                                                                                                                                                         |
| **Header Actions**                                         | Header buttons. Each entry in **Actions**: **Label**, **Name**, **Icon Name**, **Title** (hover text), **Alternative Text**, **On Click** (any interaction below but Open Flow Panel). **Visible Actions Buttons**: how many show before a menu. |

### Center Location

By default the map centers on its markers. **Center Location** overrides it:

* **Latitude**, **Longitude**: the exact center, ahead of the address.
* **Street**, **City**, **State**, **Postal Code**, **Country**: center by address. Google Maps only.
* **Display As Marker**: shows the center as a marker, whose **Type** sets its shape.

### Clustering

Leaflet only. **Marker Clustering** groups nearby markers so dense maps stay readable.

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FCSlNYXxJQZiTY50FnaSZ%2Fmap-clustering.png?alt=media" alt="A Leaflet map of the Chicago area with forty customer sites grouped into clusters. Green circles read 4, 6, 5, 5 and 2, a yellow circle over downtown Chicago reads 17, and one site near Naperville, with no neighbour close enough, shows as a plain marker."><figcaption><p>Marker clustering groups nearby markers into one circle that shows how many it holds. A marker with no close neighbour stays a plain marker.</p></figcaption></figure>

* **Enable Marker Clustering**: on, with the settings below.
* **Coverage On Hover**: outlines a cluster's markers on hover.
* **Max Cluster Radius**: reach from the central marker, in pixels. Default 80.
* **Disable Clustering Zoom Level**: no clustering at and below this zoom.

### Draw

Leaflet only. Site users draw shapes and can save them as a Salesforce file.

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FlawIXGnU1tl9HznXusXO%2Fmap-draw.png?alt=media" alt="A Leaflet map titled Sales territories with five red markers in Chicago. A polygon outlined and filled in blue covers the north side and two of the markers. At the bottom right, the drawing toolbar shows Line, Polygon, Circle and Marker buttons, then Edit and Delete, above the zoom buttons, and a Save button sits in the bottom right corner of the map."><figcaption><p>Drawing on a Leaflet map: a territory loaded from GeoJSON when the map opens, the drawing toolbar at the bottom right, and the Save button.</p></figcaption></figure>

| Setting                      | What it does                                                                                |
| ---------------------------- | ------------------------------------------------------------------------------------------- |
| **Enable Draw**              | Adds the drawing toolbar. The settings below need it.                                       |
| **Draw GeoJSON Value**       | Shapes to load: a GeoJSON object or array. Hidden while **Save as Content Document** is on. |
| **Toolbar**                  | **Line**, **Polygon**, **Circle**, **Marker**, **Edit**, **Delete**. Default: all six.      |
| **Toolbar Position**         | A map corner. Default **Bottom Right**.                                                     |
| **Save as Content Document** | Saves the drawing as a file (ContentDocument), with a **Save** button.                      |

With **Save as Content Document** on:

| Setting                               | What it does                                                                           |
| ------------------------------------- | -------------------------------------------------------------------------------------- |
| **Auto Save Content Document**        | Saves every change, no **Save** click.                                                 |
| **Content Document Id**               | File to update. Empty: the first save creates one, later saves in the visit update it. |
| **Content Document Title**            | Default "Avonni Map Drawing Document".                                                 |
| **Content Document Linked Entity Id** | Record the file is linked to.                                                          |
| **Save Button Label**                 | Default "Save".                                                                        |

### Route

Leaflet only. Site users build a multi-stop driving route from the markers.

{% hint style="info" %}
An administrator enables routing once per package, with your own routing provider API key. Until then, this section shows guidance instead: see [Enable Map Routing](https://docs.avonnicomponents.com/experience-cloud/experience-components/ax-map/enable-map-routing.md).
{% endhint %}

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FNZBFPrsQq5oiOZOv0kKF%2Fax-map-panel-route.png?alt=media" alt="The Route section of the AX - Map panel in Experience Builder, open between the folded Draw and Filter sections. Show Route Panel is on. Below it: Disable Multi-Stop Selection off, Position with Left and Right buttons and Right selected, Display Overlaid on the Map off, Opened by Default off." width="320"><figcaption><p>The Route section once Show Route Panel is on.</p></figcaption></figure>

| Setting                          | What it does                                                                               | Requires             |
| -------------------------------- | ------------------------------------------------------------------------------------------ | -------------------- |
| **Show Route Panel**             | A **Route** button (route icon) in the header actions, opening the Route panel.            | None                 |
| **Disable Multi-Stop Selection** | No area select, so stops are added one marker at a time.                                   | **Show Route Panel** |
| **Position**                     | Panel side: **Right** (default) or **Left**.                                               | **Show Route Panel** |
| **Display Overlaid on the Map**  | Panel over the map, not beside it, **Route** button on the map (in the header on a phone). | **Show Route Panel** |
| **Opened by Default**            | Panel open on load.                                                                        | **Show Route Panel** |

By default, the panel opens beside the map:

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2Fjsa2irMeJL1cXCdasBeJ%2Fmap-route-beside.png?alt=media" alt="A Leaflet map titled Customer visits with the Route panel as a column on its right, outside the map. In the header, the Route button is selected. Five numbered stops in Chicago are joined by straight lines in the order of the list, and the panel lists them under Starting point, with Settings and the Calculate route button below."><figcaption><p>When the Route panel is not overlaid on the map, it opens as a column beside it, and the Route button in the header shows or hides it. The route is not calculated yet, so the stops are joined by straight lines.</p></figcaption></figure>

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FZWbTLCY1Rtq0NDPRlPmy%2Frouting-route-panel.png?alt=media" alt="A map of Chicago with five numbered stops joined by a driving route. The Route panel on the right lists the five stops in order with an arrival time for each stop after the first, and shows the departure and arrival times, the total duration, and the Optimize and Clear actions."><figcaption><p>Once routing is enabled, the Route panel turns the stops picked on a map into a driving route. With Mapbox, it also shows when each stop is reached.</p></figcaption></figure>

In the panel, the site user:

{% stepper %}
{% step %}

#### **Adds stops**

Clicks markers (up to 25), or draws a rectangle or lasso around several (unless **Disable Multi-Stop Selection**).

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FeDY2EJS1F0AvpKHuHFcY%2Fmap-route-multi-stop.png?alt=media" alt="Part of a Leaflet map with the Route panel open. At the top of the map, Add Multiple Stops has opened into two buttons, a rectangle tool, selected, and a lasso tool. Two stops, Atlas Logistics and Blue Finch Retail, are numbered 1 and 2 on the map and listed in the panel above Settings and Calculate route. Three markers not yet in the route are still red pins."><figcaption><p>Add Multiple Stops opens a rectangle tool and a lasso tool. Drawing a shape on the map adds every marker inside it to the route.</p></figcaption></figure>
{% endstep %}

{% step %}

#### **Picks a starting point**

Any record on the map, or **My position** (the browser's location).
{% endstep %}

{% step %}

#### **Sets the order**

Drags the stops, or clicks **Optimize** for the shortest drive (the first stop, or the starting point, stays put). **Undo**, **Redo**, **Clear** in the panel header; each stop can be removed or opened in **Google Maps** or **Waze**.
{% endstep %}

{% step %}

#### **Calculates the route**

**Calculate route** draws the roads, with each stop's distance and drive time. On Mapbox, also departure, arrival, total duration and arrival times, visits and lunch included. Stops after **End of day** are marked, never dropped:

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FA3n98JijWnTy1mvQOh8R%2Fmap-route-end-of-day.png?alt=media" alt="A Leaflet map titled Customer visits with five numbered stops in Chicago and the calculated driving route. The Route panel on the right reads 11:00 AM to 3:08 PM, 4 hr 8 min, followed by a red note: This route finishes after the end of day. Remove a stop, or start earlier. Stops 1 to 4 are blue and show their arrival times. Stop 5, Juniper Health, is orange, arrives at 3:08 PM and is flagged Past end of day, and the last leg of the route, from stop 4 to stop 5, is drawn in orange."><figcaption><p>A route that runs past the end of day: the late stop and the drive to it turn orange, its row is flagged Past end of day, and a note at the top of the panel says the route finishes too late.</p></figcaption></figure>
{% endstep %}

{% step %}

#### **Downloads the itinerary**

A download button exports the calculated route as a CSV file.

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2F0Nuttr0426GpPjI65xcV%2Fmap-route-stop-menu.png?alt=media" alt="The Route panel after a five-stop route is calculated: 8:00 AM to 10:49 AM, 2 hr 49 min, then the Starting point search and the five stops with their arrival times. The menu of stop 2, Blue Finch Retail, is open on three actions: Remove, Google Maps and Waze. At the bottom, the Calculate route button is greyed out and a download button sits beside it." width="320"><figcaption><p>Each stop has its own menu: remove the stop from the route, or open it in Google Maps or Waze. Once a route is calculated, the download button beside Calculate route exports it as a CSV file.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

The panel's **Settings**, with their defaults:

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2F2H6KgEjBOLjN5SDVtKMv%2Fmap-route-settings.png?alt=media" alt="The Route panel with its Settings section open. Lunch start 12:00 p.m., Lunch end 1:00 p.m., End of day 6:00 p.m., Visit duration (minutes) 30, Timing set to Leave at, Date Nov 14, 2026, Time 8:00 a.m., then three switches, Avoid ferries, Avoid highways and Avoid tolls, all off. The Calculate route button sits at the bottom of the panel." width="320"><figcaption><p>The Settings section of the Route panel. Timing is set to Leave at, which shows the Date and Time fields; apart from the date, every value is the default.</p></figcaption></figure>

| Setting                                                | What it does                                                                                                                                | Default                   |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| **Lunch start**, **Lunch end**                         | A route under way at lunch pauses for the whole window, driving or at a stop. Must end after it starts, between departure and end of day.   | 12:00 to 1:00 p.m.        |
| **End of day**                                         | Last time on the road. Later stops are flagged.                                                                                             | 6:00 p.m.                 |
| **Visit duration (minutes)**                           | Time at each stop, delaying later stops. First and last stops delay nothing.                                                                | 30                        |
| **Timing**                                             | Mapbox only (the one provider that models traffic). **Leave now**, **Leave at** or **Arrive by**; the last two add a **Date** and **Time**. | Leave now; Time 8:00 a.m. |
| **Avoid ferries**, **Avoid highways**, **Avoid tolls** | Keep the route off them.                                                                                                                    | Off                       |

<details>

<summary>Limits and export</summary>

* **Optimize**: on Mapbox the provider orders the stops, unless an administrator turned that off in [Enable Map Routing](https://docs.avonnicomponents.com/experience-cloud/experience-components/ax-map/enable-map-routing.md). Other providers, and routes over twelve stops: ordered by proximity.
* No link for the whole route: a directions URL takes nine waypoints at most (three on mobile), so navigation goes stop by stop.
* The file is `route_<date>.csv`, one row per stop: **Stop Number**, **Record Name** (marker title), **City** (from **Location**), **Arrival Time** (Mapbox only), **Distance (km)** and **Duration (min)** from the previous stop, **Google Maps** and **Waze** links.

</details>

### Filtering & Search

**Filters** (in Data Mappings) pick the fields, the **Filter** section sets the menu. Each filter has an operator menu.

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2FLQeM9jEafwn9WwXt4rEY%2Fmap-filters-overlay.png?alt=media" alt="A Leaflet map titled Customer sites with five customer sites in Chicago. A Search sites box sits at the top left of the map and two filter buttons, Industry and Account Type, at the top right. The Industry filter is open and its filter mode menu lists Equals, selected, then Not Equals, Empty and Not Empty, over the list of industries. A Clear link and 5 of 5 sit at the bottom of the filter."><figcaption><p>Search and filters overlaid on the map. Each filter has a filter mode button: Equals, Not Equals, Empty or Not Empty.</p></figcaption></figure>

| Setting                         | What it does                                                                                           |
| ------------------------------- | ------------------------------------------------------------------------------------------------------ |
| **Type**                        | **Horizontal** (default), **Popover** or **Panel** (in the side panel).                                |
| **Display Overlaid on the Map** | Horizontal or Popover filters over the map, not the header. Panel filters: **Side panel** overlay.     |
| **Picklist Filter Sort Order**  | **Ascending** (default), **Descending** or **Default Order of Field**.                                 |
| **Use Record Picklist Values**  | Options from values present in the records: empty values hidden.                                       |
| **Use Cascading Filter Values** | Each filter narrows the others' options to matching records. Overrides **Use Record Picklist Values**. |

| Field type                                    | Operators (default first)                                                                                                                                    |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Text, picklist, multi-select picklist, lookup | **Equals**, **Not Equals**, **Empty**, **Not Empty**                                                                                                         |
| Number, date, time                            | **Between**, **Not Between**, **Equals**, **Not Equals**, **Less Than**, **Less or Equal**, **Greater Than**, **Greater or Equal**, **Empty**, **Not Empty** |
| Checkbox                                      | No operator menu                                                                                                                                             |

**Empty** and **Not Empty** take no value: the inputs hide.

The **Search** section (requires **Show Search**):

| Setting         | What it does                                                                                                                              |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Placeholder** | Empty search bar text. Default "Search".                                                                                                  |
| **Position**    | **Left** (default), **Right**, **Center**, **Fill** (header), **Panel** (side panel) or **Overlaid on the Map** (header on a narrow map). |

### Side Panel

Holds the filters or search set to **Panel**. On a phone-width map: filters in a popover, search in the header.

<figure><img src="https://2929066058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDL6JQuZArjJeQvX2ot4y%2Fuploads%2Fg3SM0mTs60WwTzRS4N8o%2Fmap-side-panel.png?alt=media" alt="A Leaflet map titled Customer sites with a side panel on its left. The panel holds a Search sites box, an Industry filter listing Healthcare, Manufacturing, Retail, Technology and Transportation, an Account Type filter with Customer - Direct checked and Prospect unchecked, and a Clear all selections button. Both filters show an Equals filter mode button. The header reads 3 items found, Filtered by Account Type, and carries two actions, Log Visit and Share, and the button that shows or hides the panel. Three markers remain on the map."><figcaption><p>Filters and search in the side panel beside the map. Checking Customer - Direct leaves three sites on the map, and Clear all selections resets every filter.</p></figcaption></figure>

* **Position**: **Left** (default) or **Right**.
* **Reset Button Label**: the clear button. Default "Clear all selections".
* **Display Overlaid on the Map**: picks one of the two layouts below.

{% tabs %}
{% tab title="Beside the map" %}
Off: a column beside the map, toggled from the header.

* **Closed by Default**: starts closed.
* **Hide Toggle Button**: hides the header toggle.
  {% endtab %}

{% tab title="Overlaid on the map" %}
On: floats over the map, opened from a button on the map.

* **Opened by Default**: open on load.

With the Route panel also overlaid, one opens at a time.
{% endtab %}
{% endtabs %}

## Interactions

Set per marker (Manual) or in **Data Mappings** (Query).

**On Select** fires on a click, **On Drag** on a drag (Leaflet, **Draggable Markers** on). Both offer:

<table><thead><tr><th width="228">Interaction Type</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://docs.avonnicomponents.com/experience-cloud/properties-panel/interactions/show-toast.md"><strong>Show Toast</strong></a></td><td>Brief notification.</td></tr><tr><td><a href="https://docs.avonnicomponents.com/experience-cloud/properties-panel/interactions/navigate.md"><strong>Navigate</strong></a></td><td>Opens another site page or a URL.</td></tr><tr><td><a href="https://docs.avonnicomponents.com/experience-cloud/properties-panel/interactions/open-alert-modal.md"><strong>Open Alert Modal</strong></a></td><td>Alert message in a modal.</td></tr><tr><td><a href="https://docs.avonnicomponents.com/experience-cloud/properties-panel/interactions/open-confirm.md"><strong>Open Confirm Dialog</strong></a></td><td>Asks for confirmation, for example of event attendance.</td></tr><tr><td><a href="https://docs.avonnicomponents.com/experience-cloud/properties-panel/interactions/open-flow-dialog.md"><strong>Open Flow Dialog</strong></a></td><td>Runs a flow in a dialog.</td></tr><tr><td><a href="https://docs.avonnicomponents.com/experience-cloud/properties-panel/interactions/open-flow-panel.md"><strong>Open Flow Panel</strong></a></td><td>Runs a flow in a side panel, markers still visible.</td></tr><tr><td><a href="https://docs.avonnicomponents.com/experience-cloud/properties-panel/interactions/execute-flow.md"><strong>Execute Flow</strong></a></td><td>Runs an autolaunched flow in the background, no dialog or panel.</td></tr><tr><td><a href="https://docs.avonnicomponents.com/experience-cloud/properties-panel/interactions/download.md"><strong>Download</strong></a></td><td>A Salesforce file, a public link or a URL.</td></tr><tr><td><strong>Refresh All Queries</strong></td><td>Re-runs every query on the page.</td></tr><tr><td><strong>Refresh Query</strong></td><td>Re-runs the map's own query. Query data source only.</td></tr></tbody></table>

## Styling

From the **Style** section. Leaflet maps add **Map Markers**, **Zoom Controls**, **Draw Controls** and **Route Panel**.

{% tabs %}
{% tab title="Margin" %}
Outer spacing.
{% endtab %}

{% tab title="Padding" %}
Inner spacing.
{% endtab %}

{% tab title="Size" %}
Width / Height / Min Width / Max Width / Min Height / Max Height.
{% endtab %}

{% tab title="Border" %}
Size / Style / Color / Radius.
{% endtab %}

{% tab title="Header" %}

* **Header:** Background Color; Padding (each side); Margin Bottom.
* **Header Border:** Color / Size / Style / Radius; Bottom Border Color / Size / Style (with **Header Is Joined**).
* **Header Title**, **Header Caption:** Color / Font Size / Font Weight / Font Style.
* **Header Avatar:** Background Color / Foreground Color / Border Radius.
  {% endtab %}

{% tab title="Map Markers" %}
The marker popup.

* **Map Markers Background:** Color.
* **Map Markers Title:** Text Color / Font Size / Style / Weight.
* **Map Markers Description:** Color / Font Size / Style / Weight / Line Clamp.
  {% endtab %}

{% tab title="Zoom Controls" %}
Text / Background / Shadow Color; Border Color / Size / Style / Radius.
{% endtab %}

{% tab title="Draw Controls" %}
Background / Shadow Color; Border Color / Size / Style / Radius.
{% endtab %}

{% tab title="Route Panel" %}

* **Route Panel:** Background Color; Border Color / Size / Style / Radius.
* **Route Panel Header:** Background Color / Color / Font Size / Font Weight.
  {% endtab %}

{% tab title="Filters Panel" %}
The side panel.

* **Filters Panel:** Background Color; Border Color / Size / Style / Radius.
* **Filters Panel Labels:** Background, Color (each plain, Active, Hover); Collapse Icon Color; Font Size / Weight.
* **Filters Panel Options:** Color; Checkbox Border Color; Load More Button Text Color (plain, Active, Hover).
* **Filters Panel Reset Button:** Background / Text / Border Color; Border Size / Radius; Background and Border Color Hover; Background and Border Color Active.
  {% endtab %}

{% tab title="Flow Dialog" %}

* **Flow Dialog Header:** Background; Bottom Border Color / Size; Label Color / Font Size / Font Weight.
* **Flow Dialog Footer:** Background; Top Border Color / Size.
  {% endtab %}

{% tab title="Flow Panel" %}

* **Flow Panel:** Background Color; Border Color / Size / Style / Radius.
* **Flow Panel Header:** Background; Bottom Border Color / Size; Label Color / Font Size / Font Weight; Close Icon Color (plain, Active).
  {% endtab %}
  {% endtabs %}

## Use Cases

| Name                                                                                                                                                                                      | Description                                                    |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| [**Set up the map to show record details information**](https://docs.avonnicomponents.com/experience-cloud/tutorials/components/map/set-up-the-map-to-show-record-details-information.md) | Learn to display records on Experience Cloud using Avonni Map. |

### Example 1 : Reactive Account Map

{% @arcade/embed url="<https://app.arcade.software/share/Dxon9206UTTMphdamjrL>" flowId="Dxon9206UTTMphdamjrL" %}

The map shows the billing location of the account a rep selects in an Accounts Data Table. Before you begin: an Accounts Data Table on the page, API name `AccountsTable`.

{% stepper %}
{% step %}

#### **Add the Map component**

* Drag the AX - Map component onto the Experience Builder canvas
  {% endstep %}

{% step %}

#### **Configure the component**

* Set the API name to `MapAccount`
* Set the type to `Leaflet`
  {% endstep %}

{% step %}

#### **Set a data source**

* Create a query on the Account object
* Apply the following filter: Id = `{{AccountsTable.selectedRecord.Id}}`
  {% endstep %}

{% step %}

#### **Set data mappings**

* Set Title to `Account Name`
* Under Location, set Latitude to `Billing Latitude` and Longitude to `Billing Longitude`
  {% endstep %}

{% step %}

#### **Preview your work**

* Preview, select a record in the Accounts Data Table, and check that the map shows its billing location
  {% endstep %}
  {% endstepper %}

### Example 2 : Customer Order Tracking

{% @arcade/embed url="<https://app.arcade.software/share/tiVuRRBHNCbcUb5qoGQL>" flowId="tiVuRRBHNCbcUb5qoGQL" %}

Customers see where their order is. Before you begin: a custom Geolocation field on Order holding the tracking coordinates.

{% stepper %}
{% step %}

#### **Add the Map component**

* Drag the AX - Map component onto the Experience Builder canvas
  {% endstep %}

{% step %}

#### **Configure the component**

* Set the API name to `TrackingMap`
* Set the type to `Leaflet`
  {% endstep %}

{% step %}

#### **Set a data source**

* Create a query on the Order object
  {% endstep %}

{% step %}

#### **Set data mappings**

* Set Title to `Order Number`
* Set Type to `Pin`
* Under Location, set Latitude to `Tracking Geolocation (Latitude)` and Longitude to `Tracking Geolocation (Longitude)`
  {% endstep %}

{% step %}

#### **Preview your work**

* Preview and check that each order shows as a pin at its tracked location
  {% endstep %}
  {% endstepper %}

## Troubleshooting Common Issues

| Problem                             | Cause                                                                                     | Fix                                                                                                                                                                                                               |
| ----------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No Route button on the map          | **Type** is not **Leaflet**, or **Show Route Panel** is off.                              | Set **Type** to **Leaflet**, turn on **Show Route Panel** in **Route**.                                                                                                                                           |
| **Route** shows enablement guidance | Routing not enabled for this package.                                                     | An administrator enables it in the **Avonni Experiences** app, **Settings** tab: see [Enable Map Routing](https://docs.avonnicomponents.com/experience-cloud/experience-components/ax-map/enable-map-routing.md). |
| A straight line instead of roads    | Provider unreachable or quota spent. The line keeps the stop order visible.               | If every route falls back: in Setup, **Remote Site Settings**, activate `Avonni_Route_Mapbox` and `Avonni_Route_ORS`.                                                                                             |
| No Timing setting, no arrival times | OpenRouteService is the provider. Times, and the CSV's **Arrival Time**, are Mapbox only. | Expected. Arrival times need Mapbox.                                                                                                                                                                              |
| Markers missing on a Leaflet map    | Records have an address but no coordinates.                                               | Map **Latitude** and **Longitude** under **Location**, or set **Type** to **Google Maps**.                                                                                                                        |


---

# 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/experience-cloud/experience-components/ax-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.
