eo_remote_geocode Since 1.2 PRO
Located at pro/includes/functions.php
Given an address, returns the latitude-longtitude co-ordinates of that address.
By default uses [Nominatim Search Service](http://open.mapquestapi.com/nominatim/) to geocode an address. The result is cached for 1 week. Returns the an array of latitude-longtitude co-ordinates, indexed by 'lat', and 'lng'.
Applies the filter
eventorganiser_remote_geocode to allow
plug-ins to change the service provider or append an API key if this becomes
Please note that this function is offered without any gurantee of accurracy. Please note that the default service provider may in the future require an API key - this canbe added usign the above filter
The following retreives all events within 10 miles of Windsor Castle
$venue_query = array( 'proximity' => array( 'center' => eo_remote_geocode( "Windsor [castle]" ), 'distance' => 10, 'unit' => 'miles', 'compare' => '<=' ), ); $events = eo_get_events( array( 'event_start_after' => 'now', 'venue_query' => $venue_query, ));
Return value summary
||Indexed by 'lat' and 'lng'|