-
Notifications
You must be signed in to change notification settings - Fork 5
maps
{
"type": "maps",
"id": "input-maps",
"label": "input-maps",
"description": "description",
"size": "half",
"placeholder": "placeholder"
}
The maps field allows you to display a map to the user, with a search field and a draggable pin.
The user can fill the search field, which is based on the Google Places Search Box, or drag the pin across the map to decide a location. Aeria autocompletes the address fields, but you're able to edit them as you prefer. For example, if we needed to save a location inside a skyscraper, we would need to specify the floor. The pin location is not affected by any edits of these fields.
You need to provide a Google Maps API key in the settings. You can find the page under "Settings"--> "Aeria Map Options". Make sure to activate the correct APIs on the Google Cloud Platform dashboard.
In addition to saving the coordinates, Aeria saves these fields:
-
address
is the address -
autocomplete
is the text found in the places search box -
country
is the country -
locality
is the city -
postal_code
is the ZIP code of the place -
region
is the region -
route
represents the street -
street_number
is the street number
All of these fields, apart from autocomplete
, are editable to your preference with no consequences on the coordinates.
For the general option fields, check the getting started page.
The maps field has no additional options.
You can filter the field's fetched value by calling WordPress' add_filter with the tag "aeria_get_maps"
.