Brilliant Geocoder for Gravity Forms is a powerful and flexible geocoder field
for Gravity Forms. The Geocoder field is easily be configured to capture geocoder
input values from other form fields.
It comes with the
OSM Nominatim
geocoder enabled by default and supports
Geocod.io
and the
Google Maps API once you've entered
API keys for those services.
The geocoder field can be displayed as a map, as latitude and longitude
fields, as the raw GeoJSON data, or hidden.
This plugin supports WP-GeoMeta, so if you create posts or users with geocoded
data, their location will be stored as spatial metadata.
NOTICE:
This plugin uses 3rd party services to provide geocoding results.
The default geocoder, OSM Nominatim, requests that you include your email address
in API calls if you are making a large number of requests. We send the WP admin
email address by default. You can change what is sent on the Gravity Forms settings
page, under Geocoder
..
What is Geocoding?
Geocoding is the process of turning
text (an address) into coordinates (latitude and longitude). With coordinates
you can display data on a map and do location based searching.
Support for Other Geocoders
Brilliant Geocoders for Gravity Forms includes hooks so that you can add
support for other geocoding services.
OSM Nominatim support is built into the plugin, but
Geocod.io and Google Maps
API support is written the same way that you would add support for another
service. The
Geocod.io example in particular has extensive comments.
Please see geocoders/geocodio.php and geocoders/geocodio.js for details.
Be sure that Gravity Forms 2.0.0 or higher is installed.
With Gravity Forms installed, you can install this plugin in the usual WordPress way.
- Unzip and upload the plugin files to the
/wp-content/plugins/brilliant-geocoder-gravityforms
directory,
or upload the plugin's .zip file through the WordPress plugin screen directly.
- Activate the plugin on the 'Plugins' screen in WordPress.
Creating your first Geocoding field
- (Optional) Visit the Gravity Forms settings page enter a Geocod.io or
Google Maps API key, or to change which email is sent with OSM Nominatim API calls.
- Create a new Gravity Form (or edit an existing one).
- (Optional) Visit the form settings page and select which geocoder to use.
It will use OSM Nominatim by default.
- Add the input fields you want the user to fill out.
- Add the Geocoder field (under the Advanced Fields tab).
- In the Geocoder field associate the geocoder parameters with the other input
fields on your form.
- Publish your form and add it to a page like you would any other Gravity
Form!
and add the Geocoder field from the Advanced Fields
menu. Add other input fields, then in the Geocoder settings select which
fields will be used as parameters for the geocoding.