new Google\Position(
bool $throw_exceptions_on_error = true,
bool $log_errors = true,
string $api_key = Config::get('google','api_key')
)
(new Google\Position)
->setAddress('Place Charges de Gaulle, 75008 Paris, France')
->getPosition(); // array
More options
->getLatitude() // float
->getLongitude() // float
(new Google\Position)
->setPosition(
48.8737917,
2.2950275
)
->getAddress(); // string
More options
->getStreet() // string
->getStreetNumber() // string
->getZipCode() // string
->getCity() // string
->getCountry() // string
- Retrieve a photo url from streetview
$photo_url = (new \Google\Photo)
// ->position($lat,$lnt)
->option(['key'=>'YourGoogleApiKeyHere'])
->address('Some normal address')
->size(500,500)
->url();
- Retrieve a static map url with a marker
$map_url = (new \Google\Map)
->option(['key'=>'YourGoogleApiKeyHere'])
->center($lat, $lng);
->zoom(7)
->retina(true)
->marker($lat, $lng)
->size(600,600)
->url();