dev-master
9999999-devHelper to use Google's StreetView, Maps, Distance... APIs
GPL-3.0
The Requires
- php >=7.1.0
- polyfony-inc/polyfony *
by AnnoyingTechnology
api distance google maps geocoder streetview
Helper to use Google's StreetView, Maps, Distance... APIs
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, (*1)
->getLatitude() // float ->getLongitude() // float
(new Google\Position) ->setPosition( 48.8737917, 2.2950275 ) ->getAddress(); // string
More options, (*2)
->getStreet() // string ->getStreetNumber() // string ->getZipCode() // string ->getCity() // string ->getCountry() // string
$photo_url = (new \Google\Photo) // ->position($lat,$lnt) ->option(['key'=>'YourGoogleApiKeyHere']) ->address('Some normal address') ->size(500,500) ->url();
$map_url = (new \Google\Map) ->option(['key'=>'YourGoogleApiKeyHere']) ->center($lat, $lng); ->zoom(7) ->retina(true) ->marker($lat, $lng) ->size(600,600) ->url();
Helper to use Google's StreetView, Maps, Distance... APIs
GPL-3.0
api distance google maps geocoder streetview