Map
Overview
Use Avonni Map to show Salesforce records as locations on Google Maps or Leaflet. Choose pins or shapes, then add tools such as search, filters, or a details panel. Leaflet also supports clustering, drawing, and route planning.
Tutorials
Browse the Map tutorial hub for builds that start with Salesforce records.
To start with a Data Table selection, see Reactive Map and Data Table.
Choose a map type
Records have street addresses and you need the list beside the map
Google Maps
Records already have latitude and longitude and you need clusters, drawing, or route planning
Leaflet
Projects
See how Map fits into a complete Salesforce workflow. Each project includes steps to build it with AI or manually.

Put the technician timeline and the map of the day's jobs on one screen, from one query.
Configuration
Select the Map on the canvas to open the Edit Map panel (Properties, Interactions, Style). The sections below follow the Properties tab; its groups depend on the map Type.
Data Source
Where the map gets its locations.
Manual
Enter data directly into the component configuration.
Variable
This is useful for data that changes based on user interactions or other component logic.
Query
This is the most common option for displaying Salesforce records.
Data Mapping
With a Query or Variable source, map your Salesforce fields to the marker attributes.
Location: address fields, or Latitude and Longitude.

Location: Latitude and Longitude, no address fields, plus an optional City for the route stop list and route file. Image Source, Infos (links: Label, URL) and Fields fill the popup.

Type sets the marker shape, the styling fields its fill color, stroke and scale. Map them to formula fields to color-code markers, for example Accounts by industry.


Default
Standard map pin
Circle
Circular area
Radius, in meters
Rectangle
Rectangular area
Bounds: north, south, east, west
Polygon
Multi-sided shape
Paths: latitude and longitude points
Pin
Classic pin, icon styling
Custom Icon
Fully custom icon
SVG path

Filters
Fields offered as filters. Only these appear in the filter menu.
Search Fields
Mapped fields the search covers. Default: every searchable mapped field.
Content
Type
Google Maps (default) geocodes addresses: best under 100 markers. Leaflet, open source, handles thousands of markers and adds clustering, drawing, route planning and GeoJSON.


Marker position
Address, or latitude and longitude
Latitude and longitude only
Map Center Location
Coordinates or address
Coordinates
Own groups
None
Marker Clustering, Draw, Route, Popup, Image
Display and Controls
List View
List beside the map: Visible, Hidden or Auto (default, shown with several markers).
Google Maps
List Title
Heading above the list.
Google Maps
Zoom Level
Initial zoom, 0 (world) to 23 (building).
Disable Dragging
No panning.
Disable Scroll Wheel Zooming, Disable Double Click Zoom
No zoom by scroll wheel, or by double-click. Only while dragging is allowed.
Hide Zoom Controls
No zoom buttons.
Disable Default UI
No Map and Satellite buttons.
Google Maps
Show Footer
Footer bar below the map.
Google Maps
Zoom Controls Position
Bottom Right (default), Bottom Left, Top Right, Top Left.
Leaflet
Tile Layer
Custom tile URL template, replacing OpenStreetMap.
Leaflet
Selected Marker Value
Marker pre-selected on load, by value, for example a list's selected record.
Enable Multi-Select Markers
Ctrl+click (Cmd+click on a Mac) selects several markers, returned in Selected Markers sObject.
Leaflet

Map Center Location
Where the map centers on load. Bind any field to a Variable resource to move the center as the end user works on the page.

Latitude, Longitude
Decimal coordinates.
Street, City, State, Postal Code, Country
Center geocoded from an address.
Google Maps
Display As Marker
Center marker: one of the six marker types, with its attributes.
Marker Clustering (Leaflet only)
Groups nearby markers into numbered clusters, so large datasets stay fast and readable.

Enable Marker Clustering
Clustering on.
Coverage On Hover
Hovering a cluster outlines its markers' area.
Max Cluster Radius
Max distance, in pixels, from the central marker. Default 80.
Disable Clustering Zoom Level
No clustering at this zoom and below.
Draw (Leaflet only)
End users draw shapes, a sales territory for example, and can save them as a Salesforce file.

Enable Draw
Drawing toolbar on. Updates the Draw GeoJSON Value output.
Draw GeoJSON Value
Shapes pre-loaded on the map (GeoJSON object or array). Hidden when saving as a file.
Toolbar
Line, Polygon, Circle, Marker, Edit, Delete. Requires Enable Draw.
Toolbar Position
Bottom Right (default), Bottom Left, Top Right, Top Left.
Save as Content Document
Saves the drawing as a Salesforce file (ContentDocument). Requires Enable Draw; the five settings below require it.
Auto Save Content Document
Saves with no button click.
Content Document Id
Existing file to update instead of a new one.
Content Document Title
File title. Default "Avonni Map Drawing Document".
Content Document Linked Entity Id
Record the file is linked to.
Save Button Label
Manual save button. Default "Save".
Route (Leaflet only)
End users turn the map's markers into a multi-stop driving route, then open each stop in a navigation app or export the itinerary.

Route Group Settings
The settings below Show Route Panel require it.

Show Route Panel
Route button (route icon) in the header actions, opening the Route panel.
Disable Multi-Stop Selection
No Add Multiple Stops: one marker at a time.
Position
Right (default) or Left.
Display Overlaid on the Map
Panel over the map, Route button on the map (in the header on a narrow map, such as a phone).
Opened by Default
Panel open on load.

In the Route Panel
Route Panel Settings

Timing
Leave now, Leave at, Arrive by; the last two add Date and Time. Mapbox only (traffic).
Leave now. Time 8:00 AM
Visit duration (minutes)
Time at each stop, delaying the later ones; first and last stops excluded (ten stops, eight visits).
30
Lunch start, Lunch end
A route under way at lunch start, driving or at a stop, pauses for the window and later stops shift. No break if it leaves after lunch starts. End after start, between departure and end of day.
12:00 PM to 1:00 PM
End of day
Last time on the road. A later stop turns orange (marker, drive, number), flagged Past end of day. None is dropped.
6:00 PM
Avoid ferries, Avoid highways, Avoid tolls
Sent to the provider and the Google Maps links.
Off

Header
A title bar above the map, with header actions.

Title
Header heading.
Caption
Smaller label above the title.
Avatar
Image URL, Fallback Icon Name or Initials. Size and variant (Circle, Square) under advanced options.
Help Text
Hoverable info icon.
Is Joined
No bottom border or shadow: flush on the component below.
Actions
Buttons with Label, Name, Icon Name, optional Disabled and Hidden.
Visible Actions Buttons
Buttons shown before the rest overflow into a menu.
Hide Actions, Disable Actions
Hide, or disable without hiding, every action button.
Show More Details Panel
Side panel with record details for the selected marker.

Popup (Leaflet only)
A marker click opens its popup, filled from the Leaflet data mappings.

Width
Popup
Maximum width in pixels. 300 when empty.
Image Fallback
Image
Shown when the image fails to load.
Position
Image
Left (default), Right, Top, Bottom, Background.
Size
Image
Small, Medium, Large (default). Width for Left and Right, height otherwise.
Width, Height
Image
Pixels, overriding Size: width for Left and Right, height for Top, Bottom, Background.
Crop Fit
Image
Cover (default), Contain, Fill, None.
Crop Position X / Y
Image
Anchor along each axis, in percent.
Records at the exact same coordinates share one marker whose popup pages through them (arrows, counter), no location edited. Point markers only, not Circle, Rectangle or Polygon; a record with no Title is skipped.

Filter
How the filter menu appears; fields come from Filters in Data Mapping.

Type
Horizontal (default, above the map), Popover (from a filter button) or Panel (side panel).
Display Overlaid on the Map
Filters over the map, not in the header. Horizontal and Popover only; Panel overlays from Side Panel.
Use Record Picklist Values
Picklist options from the loaded records, not the full value set.
Use Cascading Filter Values
An applied filter narrows the others to matching records. Overrides Use Record Picklist Values.
Search
Finds markers by text.
Show Search
Search bar on.
Placeholder
Default "Search". Requires Show Search.
Position
Header Left (default), Right, Center, Fill; Panel (side panel); Overlaid on the Map (back in the header on a narrow map). Requires Show Search.
Side Panel
Holds the filters or search set to Panel. On a narrow map, such as a phone, filters become a popover and search moves to the header.

Position
Left (default) or Right.
Display Overlaid on the Map
Panel over the map, opened from a button on it. With the Route panel also overlaid, one is open at a time.
Closed by Default
Starts closed.
Not overlaid
Hide Toggle Button
Hides the header button that opens and closes the panel.
Not overlaid
Opened by Default
Open on load.
Overlaid
Reset Button Label
Button that clears the filters. Default "Clear all selections".
Set Component Visibility
Show or hide the Map on conditions: see Component Visibility.
Interactions
Interactions define what happens when the end user acts on the Map. Set them in the Interactions tab of the Edit Map panel.
Marker Select
Clicks a marker. Not with the Route panel open (the click adds a stop; outputs unchanged). At a shared address, outputs follow the record shown; paging does not refire.
Selected Marker, Selected Marker SObject (Query or Variable)
Header Action Click
Clicks the header action set in Target Name.
Clicked Header Action Name
Drawing Created
Completes a drawing, to store or process.
Draw GeoJSON Value
Leaflet
Marker Created
Places a toolbar marker.
Created Marker
Leaflet
Save As Button Click
Clicks the manual save button (drawing saved as a ContentDocument).
Leaflet
Output Variables
Use them elsewhere on the page, for example Selected Marker SObject to show the clicked Account beside the map.
Selected Marker
Object
Value, title, description, location (Latitude, Longitude)
Marker click
Selected Marker SObject
Record (SObject)
The marker's record (Query or Variable)
Marker click
Selected Marker Value
Text (String)
The marker's value
Marker click
Selected Markers sObject
Record Collection (SObject[])
Every selected record, with Enable Multi-Select Markers (Query or Variable)
Marker click
Created Marker
Object
New marker's Latitude, Longitude
Toolbar marker (Leaflet)
Draw GeoJSON Value
Text (String)
Drawn shapes as GeoJSON, to persist to a record
Drawing change (Leaflet)
Clicked Header Action Name
Text (String)
Clicked action's name
Header action click
Number of Items
Integer
Markers loaded
Loaded markers change
Visible Width (km)
Integer
Visible width at the current zoom
Center or zoom change
Center Latitude, Center Longitude
Number
Map center
Load; each pan (Leaflet)
Zoom Level
Text (String)
Current zoom
Each zoom (Leaflet)
Styling
Set from the Style tab. "Border" below means Border Color, Size, Style and Radius.
Margin, Padding
Outer, inner spacing
Top, Right, Bottom, Left
Size
Dimensions
Width, Height
Border
Map border
Border
Header
Header
Background Color; Padding Top, Right, Bottom, Left; Margin Bottom
Filters Panel
Filters and search panel
Panel: Background Color, Border. Labels: Background, Color (each plus Active, Hover), Collapse Icon Color, Font Size, Font Weight. Options: Color, Checkbox Border Color, Load More Button Text Color (plus Active, Hover). Reset Button: Background, Text and Border Color, Border Size, Border Radius; Background and Border Color Hover and Active
Map Markers
Marker popup
Background Color. Title: Text Color, Font Size, Style, Weight. Description: Color, Font Size, Style, Weight, Line Clamp. Info: Text, Link, Link Hover Color, Font Size, Style, Weight. Fields: Background Color, Border, Spacing Inline, Spacing Block. Fields Label, Fields Value: Color, Font Size, Style, Weight
Leaflet
Selected Marker
Selected marker
Scale
Leaflet
Zoom Controls
Zoom buttons
Text, Background, Shadow Color; Border
Leaflet
Draw Controls
Draw toolbar buttons
Background, Shadow Color; Border
Leaflet
Route Panel
Route panel
Panel: Background Color, Border. Header: Background Color, Color, Font Size, Font Weight
Leaflet
Troubleshooting Common Issues
No Route button
Routing is Leaflet only: set Type (Content) to Leaflet, turn on Show Route Panel.
The Route group shows enablement guidance
Routing is off for this package: an administrator enables it in the Avonni Components app, Settings tab. See Enable Map Routing.
Straight line instead of roads
Provider unreachable or quota spent (the panel says which); the line keeps the stop order. If every route falls back, activate the Avonni_Route_Mapbox and Avonni_Route_ORS Remote Site Settings.
A stop cannot be routed to
No road near it; the message names it. Fix its coordinates or drop it.
No Timing setting, no arrival times
OpenRouteService has no traffic model: times are Mapbox only, and the CSV omits Arrival Time.
Build with AI
MCP name: dcMap · Toolset: dynamic
Ask your AI assistant: "Create an Avonni Dynamic Component with a Map showing my Accounts as markers, with the list view visible and a search bar."
The avonni-dynamic-components skill generates the component's metadata file locally. Nothing is deployed. Styling hooks are available through the MCP server's get_component_styles tool.
Last updated
Was this helpful?







