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.

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 then 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 you will be able to check " Set this API also in ACF Configuration" only if you have ACF plugin activated and DCE will do the work for you. 

ACF Integration (Manual Mode)

ACF requires Google Map API to be manually configured as described by the plugin in this documentation page.
Add this code in the function.php file of your theme-child. Follow the instructions on this page:

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 your 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 will 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 where you can select a different data source. If you'd like 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 and save time.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us