Proximity Search Model
The Proximity Search Model is used internally to configure the SQL query of a proximity search.
FOR EDGE CASES ONLY
You will rarely need to call the Proximity Search Model directly, it is for internal use only.
# Public Properties
# query
ElementQueryInterface - Element query being adjusted to perform the proximity search.
# field
AddressField - Address field being queried in proximity search.
# options
array - Array of options for configuring the proximity search.
# Public Methods
# init()
use doublesecretagency\googlemaps\models\ProximitySearch;
new ProximitySearch($config);
Arguments
$config
(array) - An associative array containing the public properties shown above.
Returns
void - Modifies $query
object and returns nothing.
# haversineRadius($units)
use doublesecretagency\googlemaps\models\ProximitySearch;
$radius = ProximitySearch::haversineRadius('km');
Arguments
$units
(string) - Measurement units for distance. Defaults tomiles
.
Can be any of the following: mi
, miles
, km
, kilometers
Returns
int - Radius of Earth as measured in the specified units. Useful in a haversine formula.