Skip to content

Hosted map

Use this page when the Map Records and Take Action component loads the hosted v1 map (iframe overlay, click-to-select, draw fence with boundary layer)—not for Flow-only lookup callouts.

GIS API map token and extract endpoints require the same API key configuration as data callouts. See Salesforce setup for the dual key path.

RequirementNotes
Package installedreportMapWithFence + MapTokenService
API Key on custom settingNon-blank APIKey__c → hosted mode available
Named Principal APIKeySame key; used for POST /gis/v1/token/
Licensed serviceOne of the names on your API key—not demo names unless licensed
CSP Trusted URLhttps://apis.threelevers.com with frame-src

In Lightning App Builder, the component exposes Overlay Service and Map URL fields (in addition to Configuration JSON):

  • Overlay Service — your licensed service name (must be provisioned on your API key)
  • Map URLhttps://apis.threelevers.com/gis/map/v1/

Map Overlay: Overlay Service and Map URL (KCDistricts example)

These correspond to the service and serviceUrl keys in Configuration JSON below.

Set on the Map Records and Take Action component:

{
"reportId": "00OXXXXXXXXXXXX",
"latitudeColumn": "YOUR_LAT_COLUMN",
"longitudeColumn": "YOUR_LNG_COLUMN",
"idColumn": "YOUR_ID_COLUMN",
"service": "YourLicensedServiceName",
"serviceUrl": "https://apis.threelevers.com/gis/map/v1/",
"flowApiName": "Your_Flow_API_Name",
"nearDistanceMiles": 5
}
  • service — must match one service provisioned on your API key (each Lightning page picks one layer; your key may include several).
  • serviceUrl — use HTTPS v1 map base; component may upgrade HTTP for Three Levers hosts.

See also Map Records configuration for the full component JSON reference.

MapTokenService:

  1. Reads API Key from custom setting to decide if external map is offered.
  2. Requests a short-lived token via Named Credential callout to /gis/v1/token/.
  3. Caches token on custom setting fields Map_Token__c and Token_Expires_At__c.

After rotating the API key, update both key locations and click Refresh on the component (or call MapTokenService.clearTokenCache()).

  1. SetupTrusted URLs (or CSP Trusted Sites).
  2. New → URL https://apis.threelevers.com
  3. Enable frame-src (iframe). Add connect-src / img-src if your org policy blocks child resources.

Local-only mode: If API Key is blank, the component falls back to local Leaflet (draw fence without overlay). No GIS API token is used.

Hosted map + Send to Flow uses Screen Flow Text inputs such as inIds, outIds, nearIds (comma-separated record IDs). See Map Records Flow integration.