Adds a coordinates map field to Advanced Custom Fields. This field allows you to find the coordinates of a location.
When you create a new custom field with ACF, set the field type to Coordinates map. Now the coordinates chooser should show up when you edit a post with your custom fields.
To get the coordinates data in your frontend, simply request the field value and in return you get the latitude, longitude and the address.
<?php $values = get_field('*****FIELD_NAME*****'); $lat = $values['lat']; $lng = $values['lng']; $address = $values['address'];
Address is not the exact, correct name of the location. Instead it is the term you wrote when searching for the coordinates.
Requires: 3.4.0 or higher
Compatible up to: 3.6.1
Last Updated: 3 years ago
Active Installs: 6,000+
Got something to say? Need help?