About GravityView Maps geocoding
Geocoding turns an address into a latitude and longitude, which GravityView Maps needs to put an entry on a map. It uses the form’s Address fields, and it runs automatically or one entry at a time. An Address field inside a Repeater field has no geocoding controls on the entry screen, and a Map View’s Address Fields setting doesn’t offer it.
Geocoding works for addresses outside the US too. GravityView Maps asks Google first.
If Google returns no result, which also happens when no Google key is set, it tries Bing or MapQuest when you have added keys for them, then OpenStreetMap. A Google key that is invalid or not allowed to use the Geocoding API stops the lookup there.
Note: Geocoding uses the Geocoding Key saved under GravityKit, then Settings, then GravityView Maps. Setting up Google Maps API keys for GravityView Maps explains how to create it and how to restrict it.
Manual geocoding #
To geocode one entry:
- Go to Forms, then Entries, and click the entry to open it.
- Check that the address is complete and spelled correctly. If it isn’t, click Edit, correct it, and click Update.
- Under the address, click Geocode This Address.

GravityView Maps looks up the address and saves its latitude and longitude, and a notice above the address says “Coordinates were fetched and saved for this address.” The latitude and longitude show under the address, and the map below the buttons shows where the pin is, so you can check that it’s at the address:

If the lookup fails, a red message on the entry says why, such as “No geocoding provider could find this address.”
To set the position yourself, type the Latitude and Longitude and click the Update button that appears next to them. How to override geocoding coordinates has more.
Automatic geocoding #
Entries also get their position without your help when either of these is on.
Address suggestions on the form
With Enable GravityView Maps geolocation autocomplete checked on an Address field, visitors get address suggestions from Google as they type. When a visitor picks one, its latitude and longitude are saved with the entry.
To turn it on, edit the form, click the Address field, check the box under Field Settings, and click Save Form. The suggestions need the Places API on your Maps Key.

Automatic geocoding in the View
With Enable automatic geocoding on, a Map View looks up the entries on the page that haven’t been looked up yet when the page loads. To turn it on, open the Maps tab of the View’s Settings box, turn on Enable automatic geocoding, and click Update:

When an address changes
Saving an entry with a changed address, in Gravity Forms or in GravityView’s Edit Entry, deletes the position calculated from the old address, so the pin disappears. With Enable automatic geocoding on, the entry is looked up again the next time the map loads. Saving without changing the address keeps the position.
Saving the entry also fills an empty State or Country with the field’s default value, and that counts as a change of address too.
When a lookup fails
When automatic geocoding fails for an entry, the entry gets no pin, and a note from GravityView Maps in its Notes box gives the reason. Why aren’t some of my entries showing up on the map? shows how to list every entry without a position.
To geocode such an entry:
- If the address is wrong or incomplete, click Edit, correct the address, and click Update. Then click Geocode This Address.
- If the address is right, as after a problem with the Geocoding Key, click Geocode This Address.
When a pin is in the wrong place #
GravityView Maps geocodes whatever an Address field holds. When an entry fills in only part of an address, its pin lands at the center of that part:
- A country alone, such as
United States, puts the pin near the middle of the country. For the United States, that’s central Colorado. - A state alone puts it in the middle of the state.
- A city alone puts it at a city of that name, such as Springfield, Illinois for
Springfield.
It can happen with an optional second Address field, such as a second location, that some entries fill only partly. A field left empty, or holding only its own default state and country, gets no pin.
To fix the entry, open it under Forms, then Entries, click Edit, complete the address or clear it, and click Update. Saving deletes the position calculated from the old address.
Support for other geolocation add-ons #
GravityView Maps also reads the coordinates saved by Gravity Wiz’s Address Autocomplete and by Gravity Forms’ Geolocation Add-On.
When the form has more than one source of coordinates, the Maps tab of the View’s Settings box gets a Geocoding Source setting, where you choose the one the View uses.

After you choose another source, click Update. The View editor then shows a notice that the form uses multiple sources of geolocation data, with a Migrate to button for the source you chose.
