Location
Pro
Location stores a place: its address and its exact coordinates. Editors type an address and pick a suggestion, or click the map and drag the pin to the exact spot.
What gets stored
Besides the full address and the latitude and longitude, a Location keeps the address broken into parts: street number, street, unit, neighborhood, city, district, region, postcode and country. You can use each part on its own, for example to show only the city on a listing card, or to test the country with conditional logic.
Coordinates are rounded to 5 decimal places, about a meter.
Settings
- Show map: display the map under the address field. It's on by default.
- Default location: a place new entries start with, such as your city center.
Address search
The address suggestions come from the geocoding provider configured under Maps and geocoding: Google Maps or Mapbox. Without a provider key, address search doesn't work, but editors can still set the location by clicking the map, and the field still saves coordinates.
The lookups run through your own site, so the provider key is never exposed in the browser.
Displaying it
Dynamic tags can output the address, its parts, and the coordinates. To show a map on the front end, pass the coordinates to a map block or your theme's map component.
Technical details for LLMs
- Type key:
location(Pro). Settings:show_map(default true),default_value(a location object or null). - Stored: JSON
{ address, lat, lng, street_number, street, unit, neighborhood, locality, district, region, region_code, postcode, country, country_code, place_id, provider, map_picker }.lat∈ [−90, 90],lng∈ [−180, 180]; a value needs a valid coordinate pair or is empty. - REST: read
{ address, lat, lng, ...components }; write the same (lat/lng rounded to 5 decimals). - PHP:
\VxFramework\geo_component( $value, 'locality' ),\VxFramework\geo_format( $value, … ). Both exist only where the Location field does: in a theme that may run on a site without it, wrap calls inif ( function_exists( '\VxFramework\geo_format' ) ). - Geocoding proxy:
vx-framework/v1/geo/{autocomplete,details,geocode,reverse};vx-framework/get-geo-settingsreports whether a key is set. A missing key never blocks saving. - Keep
width: full.