Geocoder Field
When creating a geolocation field group, it is always recommended to first add the Geocoder field. The Geocoder field is a hidden field and will not be seen by the front-end user. It comes with different field options and Its main purpose is to sync between the other geolocation fields and to hold the geocoded information. After adding the geocoder field to the form you need to pay attention to its field ID. The geocoder field ID will serve as the geocoder ID when settings up the other geolocation fields and syncing between them.
Geocoder Field Options
- Default coordinates - Use this feature, by entering the latitude and longitude of a default location, if you'd like to populate the Geocoder field and the other geolocation fields that are synced with it with the default location when the form first loads. Otherwise, leave the fields blank.
Page Auto-Locator Options
- Enable Page Locator - check this checkbox if you'd like the plugin to automatically try to retrieve the user's current position when the form first loads. Note that when the page locator is enabled the default coordinate above will be ignored.
- IP Address Locator - enable this feature to retrieve the user's current location based on his/her IP address. Select "Default" to use the IP address instead of the browser's locator ( HTML5 geolocation ) or "Fallback" to use the IP address only when the browser fails to retrieve the location. Please note that while the IP address locator does not require the user's permission to retrieve the location ( same way as the browser does ), it is also not as accurate compare to the browser's geolocation. To be able to use this feature you must enable the IP Address Locator feature as described in the Settings page.
- Location Found Message - enter a message that will pop up on the screen once the page locator successfully found the user's current position. You can leave the field blank to disable the message.
- Disable Location Failed Message - by default, the plugin will disable an alert message when the auto locator fails to retrieve the user's location. Check this checkbox if you wish to disable this message.
Map Marker Options
Setup the map marker options which will take place when a map is synced to the geocoder field.
- Default Latitude/Longitude - enter the latitude/longitude of the location where the marker will be placed on the map when the form first loads. This default location will only affect the location where the marker will be placed on the map. This location won't be geocoded nor it will affect the fieldsthat are synced with the Geocoder field. For such purpose, you can use the Default Coordiantes option mentioned above.
- Marker URL - a URL to an image that will be used as the map marker.
- Marker Info-window content - enter the content that will show inside an info-window that opens with a click on the marker. Otherwise, leave this field blank to disable the info-window.
- Set Marker to To Hidden On Map Load - the marker will be hidden when the form first load and will be visible once it's location changes via another geolocation field ( address field, another map field, etc... ).
- Disable Marker Drag - disable the draggable feature of the marker so it can only move when using other geolocation fields that are synced with the map.
- Move Marker using Map Click - by default, it is only possible to move the marker by dragging it on the map. Check this checkbox to allow moving the marker with a single click on the map.
- Disable Address Output - when dragging the marker, disable the output to the Address fields that are synced with this Geocoder field. This can be useful for a specific scenario where a user wants to first set the location by entering an address. Then, if the address entered is correct but the marker is not on the exact location on the map or the coordinates are not the exact desired coordinates, the user can drag the marker to the desired location without affecting the value of the Address field.
GEO my WP Integration
The features in this section related to integration with GEO my WP plugin. GEO my WP is a free plugin which you can find here.
- GEO my WP Posts Locator Integration - check this checkbox if you would like to sync the location from this Geocoder with GEO my WP when creating a post. This way, the post created on form submission will be searchable via GEO my WP search forms. Note that only one geocoder can be synced with GEO my WP at the moment.
- GEO my WP User Integration - check this checkbox if you would like to sync the geocoder location with GEO my WP users database. This way, a registered user ( or when a user updates his location ) will be searchable with GEO my WP search forms ( Members Locator and WP Users search forms ). Note that only one geocoder can be synced with GEO my WP users at the moment.
GEO my WP Meta Fields Options
- Custom Field Name - save the complete geocoded information as an array in a single custom field when creating a post.
- User Meta Field Name - save the complete geocoded information as an array in a user meta field. The information will be saved in a user meta of the user who
submitting the form. - Meta Fields Setup - save each of the geocoded fields in a custom field, user meta field
or BuddyPress profile field ( Require BuddyPress plugin ) or your choice. Click on the "Show Fields" link to see the list of fields.