Il widget ACF Map è utile per creare una mappa considerando i Metadati creati con ACF Googlemap Field.

With ACF Map Widget you can create an interactive map interface that uses:

  • ACF Google Map fields;
  • a static address;
  • Latitude/Longitude;
  • ACF Google Map fields.

GoogleMap API key integration

In order to use this widget you must first register a valid API key. To obtain an API key, please follow Google’s Get an API Key instructions. The Google Maps field requires the following APIs; Maps JavaScript API, Geocoding API and Places API. You can insert your API on our widget settings. 

ACF integration (Dynamic Mode)

Dynamic Content for Elementor will let you easily configure ACF to use the same Google Map API set in the main configuration page.
So only if you have ACF plugin activated you will be able to check " Set this API also in ACF Configuration" and DCE will do the work for you.

ACF integration (Manual Mode)

ACF requires Google Map API be manually configured as described by the plugin in this documentation page.
Add this code in the function.php file of your theme-child. On this page there are all the indications:

function my_acf_google_map_api( $api ){
   $api['key'] = 'xxx'; 	 	
   return $api;
add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');

ACF Google Map Field

In this case you must select ACF Map Field as Data Type and choose the name of your field.

in alternativa alla gestione da ACF è possibile anche definire il dato in modo statico definendo il valore 

Static Address

In this case, you must select Address as Data Type and insert the address. 

Latitude / Longitude

In this case, you must select Latitude Longitude as Data Type and insert the values in Decimal degrees. 

If you want to get the coordinates of a place, on your computer, open Google Maps. If you're using Maps in Lite mode, you’ll see a lightning bolt at the bottom and you won't be able to get the coordinates of a place. Right-click the place or area on the map. Select What's here? At the bottom, you’ll see a card with the coordinates.

ACF GoogleMap Field

Use the value set in the current post. If set in a template, the value will be dynamic and variable based on the post used by the template.

SETTINGS - other source

There is an additional tab called Settings, here you can select a different data source. If you want to view a different map instead of the current one, you can edit it by enabling this option and selecting it from Other sources.

This is useful when you want a map already defined in another post (for example the contact map also visible in the home) instead of writing it statically you can generate it dynamically, this will allow you to save time.

Still need help? Contact Us Contact Us