The Google Map Field displays an interactive map for one or more linked Geocoder Fields. Each linked location can appear as a marker, and map interaction can update the associated Geocoder when marker movement is enabled.
Configuring the Map Field
Google Map Field settings.
1. Geocoder Fields
Select one or more Geocoder Fields whose locations and markers should appear on this map. Each Geocoder’s marker behavior and custom marker URL are configured in that Geocoder Field.
2. Default Coordinates
Default Latitude
Set the map’s starting latitude (Default Value: 40.7827096).
Default Longitude
Set the map’s starting longitude (Default Value: -73.965309).
These values center the map when no linked Geocoder location is available. They do not automatically geocode the location group.
3. Map Options
Map Type
Select Roadmap, Satellite, Hybrid, or Terrain (Default: Roadmap).
Zoom Level
Select the initial zoom from 1 through 18 (Default Value: 12).
Map Width
Enter a valid CSS width (Default Value: 100%).
Map Height
Enter a valid CSS height (Default Value: 300px).
Enable Scroll Wheel Zoom
Allow visitors to zoom with the mouse wheel or trackpad (Enabled by default). Consider disabling it on scroll-heavy pages.
4. Map Styling and Map ID
Map Styles
Paste a Google Maps JSON style definition when using standard markers and no Map ID.
Map ID
Enter a Map ID created in Google Cloud to use cloud-based map styling and Advanced Markers.
Important: A Map ID overrides the JSON Map Styles setting. JSON styles are also unavailable while Advanced Markers are enabled. To use JSON styles, leave Map ID blank and enable Disable Advanced Markers in the global Gravity Geolocation settings.
5. Map Bounds Restriction
Limit map interaction to a rectangular geographic area.
Southwest Point
Enter the southwest latitude and longitude (Example: 26.423277,-82.137132).
Northeast Point
Enter the northeast latitude and longitude (Example: 26.4724595,-82.0217760).
Saved Map and Merge Tags
The field saves the map center, zoom level, map type, and marker data associated with linked Geocoder Fields. The Gravity Forms entry detail view displays a static map generated through Maps Static API.
The normal Map Field merge tag outputs the static map image.
The Map Field’s .1 merge-tag input outputs the static map URL only, which is useful in custom HTML or links.
Enable Maps Static API in the same Google Cloud project used by the plugin when static entry or merge-tag maps are required.
Setting Up and Using the Map Field
Add a Geocoder Field and one or more visible location inputs.
Add the Map Field and select the Geocoder Fields to display.
Set its default center, dimensions, map type, and zoom.
Choose either a Map ID/cloud style or supported JSON styling.
Preview the form and test geocoding, marker movement, bounds, submission, and entry output.