Support

Account

Home Forums General Issues Import addresses into Google Maps ACF to get latitude and longitude

Unread

Import addresses into Google Maps ACF to get latitude and longitude

  • Hi there,

    I’m building an Estate Agent site and they are using a provider to upload all their properties to the most well known property portals.

    We use their API to retrieve BLM files which contain all the property details but unfortunately, they don’t include the latitude and longitude.

    Each property is imported as a WordPress post so it’d be great to be able to save the address and work out the latitude and longitude so I don’t have to geocode it on every page load.

    I’ve seen Bruce’s post (http://support.advancedcustomfields.com/forums/topic/importing-addresses-into-the-map-search-box/) regarding importing the addresses into the Google Maps ACF, like this:

    array(
    	'address'	=> 'xxx',
    	'lat'		=> 'xxx',
    	'lng'		=> 'xxx'
    )

    Now, is there a way of importing the full address into the ‘address’ bit and automatically work out the latitude and longitude? Would running a query and updating all the imported posts after the import has taken place generate the latitude and longitude or do you have to actually update each entry from the WordPress editing screen?

    Any help or ideas would be appreciated 🙂

    Cheers
    Alex

Viewing 1 post (of 1 total)

The topic ‘Import addresses into Google Maps ACF to get latitude and longitude’ is closed to new replies.