Mapping Fields
Mapping fields use Google Map APIs to show locations on a map: one place, a route between two, the results of a search, or many points at once. Several of them need a latitude and longitude pair rather than an address. Where you only have addresses, the Call REST API action can convert them using a geocoding service such as Google's.
All of these fields share the settings described in Common Field Settings, and their conditions work as described in Field Conditions. Each map also has these display settings:
Default Map View - Whether the map opens as a Road Map View or a Satellite View.
Map Zoom - How far in the map starts, on the maps that offer it. Leave it at -1 to let the map choose.
View Map
Shows the area around a latitude and longitude, with no pin and no point of interest marked. Use it to give a sense of where something is rather than to mark an exact spot.
Address Map
Shows a single address with a pin on it.
Address to Map - The address. Variables and {field} references are replaced, so the map can follow an address the user has just entered or one held on the record.
Directions Map
Shows the route between two addresses.
Address to Map From and Address to Map To - The start and the end. One of each only; this field does not do multi-stop routes.
Search Map
Shows whatever a plain-language search finds, so the map can answer a question rather than plot a known point.
Search Criteria - The search, written the way you would type it into a maps site: "record stores in Seattle", "coffee shops near me", "UPS stores near 1200 Libra Drive Lincoln NE". Variables and {field} references are replaced, so the search can be built from what the user has entered.
Locations Map
Shows many points on one map. This is the map used for plotting records - every site visit, every branch, every asset - and the only one that can react when a point is clicked. It plots points; it does not route between them.
Map Center - The latitude and longitude the map centers on, written as one comma-separated pair such as 40.7354796,-96.7048616. Leave it blank and the map centers and zooms itself to show every point, which is normally what you want.
Locations - The points to plot. Each has the Lat/Lon coordinates, a Pin Title shown when the mouse rests on the point, a Description shown in the popup when the point is clicked, and a Rec ID identifying it.
Click Action - A Multi-Action field to run when a point is clicked. The clicked location's ID is sent to it and is available as [DATAVALUE], so clicking a point can open that record, fill in fields elsewhere on the form or open a modal window with the details. Note that setting a Click Action replaces the built-in popup - the Description will not be shown on its own.
Where the points come from
Points can be typed into the Locations list, but a map of a handful of hard-coded places is rarely the point. There are two ways to plot real data.
The first is the Dynamic Source on the Locations list, using the DMGETLOCATIONS variable. It works like DMGETOPTIONS but is shaped for locations, returning a point per record from a search:
[DMGETLOCATIONS(123|0||RecordID|LatLon|Title|Description)]
The DMGET variables section covers each argument in full.
The second is a Data Source field. Add a Data Source to the form, point it at the query or the data that returns your rows, then bind the map to it: choose the Data Source Field, then say which of its columns is the Lat/Lon Column, the Title Column, the Description Column and the ID Column. The advantage over a variable is that the data is fetched once and can feed several things at the same time - a map, a chart and a table all reading the same rows without the search being run three times. The Data Source Field topic covers setting one up.
Whichever route the points arrive by, the Lat/Lon values must be a latitude and longitude in one value, such as 45.666,-95.987. A map that comes up empty is nearly always a column holding an address rather than coordinates.