Map
The Avonni Map shows a map of a specific place. It can help you get a sense of location or get directions.
Tutorials
Getting Started
Customization
Step 1 — Choose Your Map Type
This is the most important decision. Everything else depends on it.
Best for
Simple, address-based maps
Data-heavy or interactive maps
Marker limit
100 markers
Unlimited
Location input
Street address
Latitude + Longitude (required)
Marker clustering
❌
✅
Draw shapes on map
❌
✅
GeoJSON territories
❌
✅
Airbnb-style refresh
❌
✅
Google Maps — Use When...
You have street addresses and fewer than 100 locations to show. No extra data prep needed — paste in 123 Main St, New York and it just works.
Example: A "Contact Us" page showing your 5 regional offices.

Please note that up to 100 markers can be displayed on the map simultaneously in Google Maps.
Leaflet Maps — Use When...
You need to handle large datasets, draw custom shapes, or build something interactive. The trade-off: every location must have latitude and longitude coordinates — Leaflet cannot geocode a street address on its own.
Example: A field sales rep opens a flow and sees all 800 accounts in their region, clustered by area. As they zoom into a city, individual pins appear. They draw a polygon around a new prospect area and save it to the record.
Important
Before using Leaflet, make sure your Salesforce records have latitude/longitude fields populated. If they don't, you'll need to geocode your addresses first.

Step 2 — Set Up Your Markers
Single Marker
Use this to highlight one specific location. Enter a street address directly or pull it from a Salesforce field.
Example: A flow that opens on an Account record and shows the account's billing address on the map.
Multiple Markers
Display a collection of locations from a Salesforce object. The setup has two parts:
Choose a data source — where the location data comes from
Map the fields — which Salesforce fields contain the address or coordinates

Data Source Options
Manual
Enter coordinates directly in the component
Fixed locations that never change
Variable
Connect to a Flow variable
Locations that change as the flow runs
Query
Pull from a Salesforce object or custom query
Large datasets, complex filters, or record-driven maps
Tip
For most "show all records on a map" use cases, use Query and point it at your object (Accounts, Contacts, custom objects, etc.)
Data Mappings
Once you've chosen a data source, map your Salesforce fields to the component's location attributes. At minimum, you need to map the Location section — this is what places the pins on the map.

Mapping the Location section is vital for correctly placing markers on the map.
Leaflet-Only Features
The features below are only available when Leaflet Maps is selected as your map type.
Marker Clustering
When you have hundreds of pins, the map becomes unreadable. Clustering solves this by grouping nearby pins into a numbered circle.
How it works:
Zoomed out: Pins in the same area merge into a single circle — e.g., a circle showing "50" means 50 accounts in that region.
Zooming in: The circle splits into smaller clusters, then individual pins.
Example: A map of 600 customer accounts. Zoomed out, users see 4–5 regional clusters. Zooming into a city reveals individual account pins.

Clustering Settings
Coverage on Hover
Hovering over a cluster shows the boundary it covers
Max Cluster Radius
How far (in pixels) from a pin before it joins a cluster. Default: 80px. Increase to create fewer, larger clusters.
Disable Clustering at Zoom Level
Below this zoom level, all individual pins display — useful so users can always see exact locations when zoomed in
Drawing & Annotations
The Draw feature turns your map into an interactive canvas. Users can draw directly on the map and save those drawings to a Salesforce record.
Example: A territory planning flow where a manager draws a polygon around a new sales zone, and it saves automatically to the related Opportunity.
Enabling Drawing
Select Leaflet as your map type
Toggle on Draw Feature in the component settings
The drawing toolbar appears on the map

Available Drawing Tools
📍 Marker
Pin a specific address or point of interest
➖ Line
Show a route, path, or connection between locations
▨ Polygon
Outline a territory, service area, or neighborhood
⭕ Circle
Define a delivery radius or zone of influence
✏️ Edit
Resize or reposition existing shapes
🗑️ Delete
Remove unwanted drawings
You can choose which tools to show and where the toolbar appears (top-left, top-right, bottom-left, bottom-right).
Saving Drawings to a Salesforce Record
Drawings are saved as a Content Document (Salesforce File) linked to a record.
Enable Save as Content Document in the component settings
Set Content Document Linked Entity ID to the record's ID — typically
{!recordId}from your flow variable(Optional) Enable Auto Save Content Document to save changes automatically without a manual save step
Optional settings
Content Document ID
Load an existing Content Document rather than creating a new one
Content Document Title
Custom file name — default is "Avonni Map Drawing Document." Example: Map Drawings - {!Account.Name}
GeoJSON — Territories & Custom Boundaries
GeoJSON lets you overlay custom shapes on the map — county lines, sales territories, zip code boundaries, or any other polygon. Think of it as a "stencil layer" on top of the map.
Two ways to use GeoJSON:
Property to use
GeoJSON Value
Draw Content Document ID
Users can edit?
❌
✅
Best for
Showing assigned territories a user can't change
Starting from a boundary and letting users reshape it
Displaying Static GeoJSON
Set the GeoJSON Value property using one of:
A single GeoJSON object (one shape)
An array of GeoJSON objects (multiple shapes)
A Content Document ID pointing to a
.geojsonfile in Salesforce Files (recommended for large datasets — max file size: 12MB)
Example: Show a rep their assigned region as a shaded polygon. They can see it, but can't modify it.
Loading Editable GeoJSON
Use Draw Content Document ID to load a starting set of shapes that users can then modify.
Save your GeoJSON as a Salesforce File
Enter its Content Document ID in the Draw Content Document ID field
This automatically enables the drawing toolbar
Users can move, resize, add, or delete shapes
To save changes, enable Save as Content Document — without this, edits are lost when the flow advances
Example: A customer success manager loads a territory polygon for a key account, adjusts the boundary to match a new agreement, and saves it back to the record.
Map Display Settings
Centering the Map
By default, the map auto-centers to fit all markers. You can override this in four ways:
Default
Let the map decide — works well for most cases
Lat/Long coordinates
Pin the center to a specific geographic point
Address fields
Use country + city (required) + optional street/postal code
Flow variables
Dynamically center based on record data — e.g., {!Account.BillingCity}
Display Center as Marker: Enable this to place a visible pin at the center point you've set — useful for "find locations near this address" flows.

Zoom Level
Set the initial zoom manually (1–22 on desktop, 1–20 on mobile):
1
The entire world
5
A continent
10
A city
15
Street-level
20
Individual buildings

Header
The Header section gives you control over the appearance and functionality of your Map header.
Title
Label for the map — shown at the top
Caption
Short description or context
Icon
Visual indicator of map purpose
Is Joined
Removes shadow/border so the map blends with an adjacent component
Buttons
Action buttons in the header — wired to interactions (see below)
List View
Controls the sidebar list of locations alongside the map.
auto (default)
Shows the list only when multiple markers are present
visible
Always shows the list
hidden
Always hides the list

Filtering & Search
Filtering Option: Adds a filter menu (popover) so users can narrow down which markers are shown

Searchable: Adds a search bar to the map. Configure placeholder text and position (
left,right,center,fill)
Marker Customization
The Type attribute controls each marker's visual style.
Default
Standard map pin
Circle
Round marker — set radius, fill color, opacity, and stroke
Rectangle
Box marker — set boundaries using lat/long, fill, and stroke
Polygon
Custom multi-sided shape — define paths, fill, and stroke
Pin
Classic teardrop pin — customize fill color and stroke
Custom Icon
Upload your own SVG for full brand-aligned markers

Common styling options (all shape types):
Fill Color & Opacity — background color and transparency
Stroke — border color, thickness, and style
Scale — zoom level the marker is optimized for
What's an SVG Path? It's a set of drawing instructions used to create custom icon shapes. You can generate SVG paths using any vector design tool (Figma, Illustrator, online SVG editors).
→ Tutorial: Customize the Map Marker
Map Interactions
Wire up map events to Flow actions using these triggers:
On Marker Select
User clicks a pin
Show a detail panel, navigate to a record, or filter a related list
On Header Action
User clicks a header button
Trigger a search, apply a filter, or open a modal
On Marker Drag
User drags a pin to a new location
Update lat/long coordinates on a record

Last updated
Was this helpful?




