Class GoogleGeocoder
Server side Google Maps geocoding.
Methods summary
public
|
#
__construct( string $apiKey )
Constructor.
Parameters
- $apiKey
- The Google Maps API key to use for geocoding
|
public
object
|
#
getLatLngFromAddress( string $address )
Converts an address to a latitude longitude pair.
Converts an address to a latitude longitude pair.
Parameters
- $address
- The address to geocode
Returns
object An object with the lat and lng of the first coordinate pair returned by Google
Throws
Exception cURL must be enabled to use this feature
Exception Failed to parse JSON response
Exception Failed to geocode address for reason given by Google
|
Properties summary
public
The
|
$apiKey
Google API key to be used for geocoding
Google API key to be used for geocoding
|
|