Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

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's installations around Colorado Springs.
A reactive map: picking an installer in the AX - Data Table moves the AX - Map to the homes that installer has equipped.

Getting Started

A short interactive tutorial on the basics.

spinner

Configuration

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

Data Source

Connects the map to your Salesforce data.

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's mailing city and department.
A Query data source on Contact, filtered on the row selected in an AX - Data Table named installers.
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:

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.
On Leaflet, Location takes Latitude and Longitude, plus an optional City.
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.

Data Model Sharing with Avonni Map

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.

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:

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.
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.
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

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.
The AX - Map panel with Type set to Leaflet: the map settings, then the sections that hold the rest of the configuration.

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.

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.
Type set to Google Maps. The circle over Hyde Park shows that shape markers work on Google Maps too.
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.
Type set to Leaflet, on the same records. Clicking a marker opens its popup.
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.

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.
List View set to Visible on a Google map. Each entry in the list shows the marker title and its address.
Zoom levels

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.

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.

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.
Marker clustering groups nearby markers into one circle that shows how many it holds. A marker with no close neighbour stays a plain marker.
  • 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.

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.
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.
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.

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.

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.
The Route section once Show Route Panel is on.
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:

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.
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.
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.
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.

In the panel, the site user:

1

Adds stops

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

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.
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.
2

Picks a starting point

Any record on the map, or My position (the browser's location).

3

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.

4

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:

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.
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.
5

Downloads the itinerary

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

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.
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.

The panel's Settings, with their defaults:

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.
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.
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

Limits and export
  • Optimize: on Mapbox the provider orders the stops, unless an administrator turned that off in Enable Map Routing. 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.

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

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.
Search and filters overlaid on the map. Each filter has a filter mode button: Equals, Not Equals, Empty or Not Empty.
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.

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.
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.
  • 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.

Off: a column beside the map, toggled from the header.

  • Closed by Default: starts closed.

  • Hide Toggle Button: hides the header toggle.

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.

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:

Interaction Type
Description

Brief notification.

Opens another site page or a URL.

Alert message in a modal.

Asks for confirmation, for example of event attendance.

Runs a flow in a dialog.

Runs a flow in a side panel, markers still visible.

Runs an autolaunched flow in the background, no dialog or panel.

A Salesforce file, a public link or a URL.

Refresh All Queries

Re-runs every query on the page.

Refresh Query

Re-runs the map's own query. Query data source only.

Styling

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

Outer spacing.

Inner spacing.

Width / Height / Min Width / Max Width / Min Height / Max Height.

Size / Style / Color / Radius.

  • 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.

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.

Text / Background / Shadow Color; Border Color / Size / Style / Radius.

Background / Shadow Color; Border Color / Size / Style / Radius.

  • Route Panel: Background Color; Border Color / Size / Style / Radius.

  • Route Panel Header: Background Color / Color / Font Size / Font Weight.

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.

  • Flow Dialog Header: Background; Bottom Border Color / Size; Label Color / Font Size / Font Weight.

  • Flow Dialog Footer: Background; Top Border Color / Size.

  • 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).

Use Cases

Name
Description

Learn to display records on Experience Cloud using Avonni Map.

Example 1 : Reactive Account Map

spinner

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.

1

Add the Map component

  • Drag the AX - Map component onto the Experience Builder canvas

2

Configure the component

  • Set the API name to MapAccount

  • Set the type to Leaflet

3

Set a data source

  • Create a query on the Account object

  • Apply the following filter: Id = {{AccountsTable.selectedRecord.Id}}

4

Set data mappings

  • Set Title to Account Name

  • Under Location, set Latitude to Billing Latitude and Longitude to Billing Longitude

5

Preview your work

  • Preview, select a record in the Accounts Data Table, and check that the map shows its billing location

Example 2 : Customer Order Tracking

spinner

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

1

Add the Map component

  • Drag the AX - Map component onto the Experience Builder canvas

2

Configure the component

  • Set the API name to TrackingMap

  • Set the type to Leaflet

3

Set a data source

  • Create a query on the Order object

4

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)

5

Preview your work

  • Preview and check that each order shows as a pin at its tracked location

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.

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.

Last updated

Was this helpful?