Shows many points on one map. This is the map for plotting records, such as every site visit, every branch or every asset, and the only map that can react when a point is clicked. It plots points; it does not route between them. For a driving route through the points, use a Route Map.


LAT/LON of 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. Two buttons under the setting set it from the map in the designer. Match Settings to Map copies the map's current center, zoom and map view into the settings, so you can move and zoom the map until it looks right and keep that view. Auto-Center clears the center again.


Map Zoom - How close the map starts, from -1 to 22. 0 shows the whole world, and each step up zooms in closer. It is used only when LAT/LON of Map Center is set; with the center blank, the map chooses its own zoom to fit the points. A new Locations Map starts at -1.


Default Map View - Whether the map opens as a Road Map View or a Satellite View.


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 a 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 point's Rec 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. Setting a Click Action replaces the popup, so the Description is not shown. A point with no Description and no Click Action does nothing when clicked.

Where the points come from

Points can be typed into the Locations list, but a map of a handful of typed-in places is rarely the point. There are two ways to plot real data.


The first is the Dynamic Source under Custom Options, below the Locations list, using the DMGETMAPLOCATIONS variable. It works like DMGETOPTIONS but is shaped for locations, returning a point per record from a search. This example plots the records of Record Type 123 that have a LatLon value:


[DMGETMAPLOCATIONS(123|0|LatLon=!#|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 and point it at the query or the data that returns your rows. Then, in the map's Data Source section, choose the Data Source Field and say which of its columns is the Lat/Lon Column, the Title Column, the Description Column and the ID Column. Leave a column name blank to use the columns in that order: the first for the coordinates, the second for the title, and so on. A Data Source that returns the output of DMGETMAPLOCATIONS needs no column names. 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 can all read the same rows without the search running three times. Points from a Data Source are added to any in the Locations list. The Data Source Field topic covers setting one up.


Whichever way the points arrive, the Lat/Lon value must be a latitude and longitude in one value, such as 45.666,-95.987. A point with an address instead of coordinates gets no pin. If your records hold only addresses, Getting Coordinates from Addresses shows how to add coordinates to them.


Keeping the map up to date

When a bound Data Source reloads, the map redraws with the new points on its own. The Refresh Map action redraws the map with the points it already has; it does not run a Dynamic Source search again.