Address and LatLong data can be displayed on a Google Map. You can click a map pin to get driving directions.
The Service Log sample application uses maps.
LatLong data is represented as comma-separated decimal values in the form "44.2456, -122.3348".
LatLong data can be captured in a form field when editing or adding rows. This uses high-accuracy GPS location capture on your device, which is potentially time-consuming and battery-intensive.
When you enter an address, always specify the complete address including the city, state (if any), and country. This makes it easier for Google Maps to locate the address.
If an address is not mapped correctly, look up the address on Google Maps to see if there is a problem with the address.
Each location is displayed as a map pin. If you have many locations, this could lead to a messy map overrun with pins. Instead, we display only the pins closest to your current location. You can control the number of pins displayed by setting the "Maximum number of map pins" property on the UX >Options tab.
Maps can be displayed in road or aerial view.
The map can be zoomed and panned. By default, the map is zoomed to show all the pins. If your map includes locations in both Australia and Canada, it may be zoomed to show half the world!
You can click or tap a map pin to select it. When you select a map pin:
- The map centers on the selected map pin.
- Information about the selected map pin is displayed below the map or in a sidebar depending on the screen size. The information displayed includes:
- A name (The contents of a column of type Name, or a key, or a Text column).
- An image, if the entry has an Image column.
- A link which can be clicked/tapped to reveal driving directions.
Customizing Map Pins
You can customize the color and icon style of map pins using format rules. You can apply format rules selectively to format some map pins one way, and other map pins another way. This allows you to highlight certain map pins, or to categorize map pins into groups.
To customize map pins:
- In the editor open the UX > Format Rules tab.
- Click "+New Rule" to create a new format rule.
- In the "For this data" drop down select the table containing the Address or LatLong field.
- In the "Then format these columns" drop down select the name of the Address or LatLong field.
- In the "Highlight color" property enter the map pin color you wish. For example, "#FF0000" is red, "#00FF00" is green, "#0000FF" is blue, "FFFF00" is yellow, "00FFFF" is cyan, "FF00FF" is magenta, and so forth.
- In the "icon" drop down select the style of icon you wish. For example, "fa-car".
- In the "If this condition is true" property enter a Yes/No expression. The format rule will be applied when the expression is true.
Create a format rule for each map pin format you wish. Specify the appropriate "If this condition is true" expression to apply that format rule to the map pins you wish.
You must install Google Maps on iPhone and iPad devices to obtain driving directions.
To obtain driving directions, click the map pin. A small car icon will appear at the bottom of the app. Click the car icon to activate Google Maps driving directions.
For more information regarding maps read this blog post.