Overview
DemandFlow provides two map row types for displaying geographic locations on records: Map (address-based) and Map Lat/Lon (coordinate-based). Both render an interactive map within the record editor, making it easy to visualise the location associated with a record.
Map (Address-Based)
The Map row type geocodes an address from the record's fields and displays it on an interactive map. It reads address components from specified fields on the record.
Map Properties
| Property | Required | Description |
|---|---|---|
| Type | Yes | Must be set to map |
| Header | No | A heading displayed above the map. |
| Height | No | The height of the map in pixels. |
| Fields | Yes | An object mapping address components to field IDs on the record. Supported components are: street1, street2, city, postcode, and country. |
Address Field Mapping
The Fields property tells the map which record fields contain each part of the address. For example:
- street1 maps to the field containing the first line of the street address
- street2 maps to the field containing the second line (optional)
- city maps to the city or town field
- postcode maps to the postal code or ZIP code field
- country maps to the country field
The map automatically geocodes the combined address and places a marker at the resolved location.
Map Lat/Lon (Coordinate-Based)
The Map Lat/Lon row type displays a location using explicit latitude and longitude coordinates stored on the record.
Map Lat/Lon Properties
| Property | Required | Description |
|---|---|---|
| Type | Yes | Must be set to maplatlon |
| Header | No | A heading displayed above the map. |
| Height | No | The height of the map in pixels. |
| Fields | Yes | An object with lat and lon properties, each mapping to the field ID containing the latitude and longitude values. |
When to Use Each Type
| Scenario | Recommended Type |
|---|---|
| Record has address fields (street, city, postcode) | Map |
| Record has precise GPS coordinates | Map Lat/Lon |
| Office or client locations | Map |
| Equipment or asset positions | Map Lat/Lon |
Best Practices
- Set an appropriate height for the map — 300 to 500 pixels works well for most layouts
- Ensure the referenced address or coordinate fields exist on the record and are populated
- For address-based maps, include at least the city and country fields for reliable geocoding
- Place maps in a column with a width of 50% or more for a useful display size