PHP Class Geocoder\Provider\GoogleMaps

Author: William Durand ([email protected])
Inheritance: extends AbstractHttpProvider, implements Geocoder\Provider\LocaleAwareProvider, use trait Geocoder\Provider\LocaleTrait
Datei anzeigen Open project: willdurand/geocoder Class Usage Examples

Public Methods

Method Description
__construct ( Http\Client\HttpClient $client, string $locale = null, string $region = null, boolean $useSsl = false, string $apiKey = null )
business ( Http\Client\HttpClient $client, string $clientId, string $privateKey = null, string $locale = null, string $region = null, boolean $useSsl = false, string $apiKey = null ) : GoogleMaps Google Maps for Business https://developers.google.com/maps/documentation/business/
geocode ( $address ) {@inheritDoc}
getName ( ) {@inheritDoc}
reverse ( $latitude, $longitude ) {@inheritDoc}
setRegion ( $region )

Private Methods

Method Description
buildQuery ( string $query ) : string
executeQuery ( string $query )
signQuery ( string $query ) : string Sign a URL with a given crypto key Note that this URL must be properly URL-encoded src: http://gmaps-samples.googlecode.com/svn/trunk/urlsigning/UrlSigner.php-source
updateAddressComponent ( array &$resultSet, string $type, object $values ) : array Update current resultSet with given key/value.

Method Details

__construct() public method

public __construct ( Http\Client\HttpClient $client, string $locale = null, string $region = null, boolean $useSsl = false, string $apiKey = null )
$client Http\Client\HttpClient An HTTP adapter
$locale string A locale (optional)
$region string Region biasing (optional)
$useSsl boolean Whether to use an SSL connection (optional)
$apiKey string Google Geocoding API key (optional)

business() public static method

Google Maps for Business https://developers.google.com/maps/documentation/business/
public static business ( Http\Client\HttpClient $client, string $clientId, string $privateKey = null, string $locale = null, string $region = null, boolean $useSsl = false, string $apiKey = null ) : GoogleMaps
$client Http\Client\HttpClient An HTTP adapter
$clientId string Your Client ID
$privateKey string Your Private Key (optional)
$locale string A locale (optional)
$region string Region biasing (optional)
$useSsl boolean Whether to use an SSL connection (optional)
$apiKey string Google Geocoding API key (optional)
return GoogleMaps

geocode() public method

{@inheritDoc}
public geocode ( $address )

getName() public method

{@inheritDoc}
public getName ( )

reverse() public method

{@inheritDoc}
public reverse ( $latitude, $longitude )

setRegion() public method

public setRegion ( $region )