2017 © Pedro Peláez
 

library google

Helper to use Google's StreetView, Maps, Distance... APIs

image

polyfony-inc/google

Helper to use Google's StreetView, Maps, Distance... APIs

  • Thursday, February 15, 2018
  • by AnnoyingTechnology
  • Repository
  • 4 Watchers
  • 2 Stars
  • 60 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 88 % Grown

The README.md

Google Helpers

Google\Position

new Google\Position(
    bool $throw_exceptions_on_error = true,
    bool $log_errors = true,
    string $api_key = Config::get('google','api_key')
)

Geocoding

(new Google\Position)
    ->setAddress('Place Charges de Gaulle, 75008 Paris, France')
    ->getPosition(); // array

More options, (*1)

->getLatitude() // float
->getLongitude() // float

Reverse geocoding

(new Google\Position)
    ->setPosition(
        48.8737917, 
        2.2950275
    )
    ->getAddress(); // string

More options, (*2)

->getStreet() // string
->getStreetNumber() // string
->getZipCode()  // string
->getCity() // string
->getCountry() // string

Google\Photo

  • 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();

Google\Map

  • 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();

The Versions

15/02 2018

dev-master

9999999-dev

Helper to use Google's StreetView, Maps, Distance... APIs

  Sources   Download

GPL-3.0

The Requires

 

by Avatar AnnoyingTechnology

api distance google maps geocoder streetview

08/02 2018

0.1.0-alpha

0.1.0.0-alpha

Helper to use Google's StreetView, Maps, Distance... APIs

  Sources   Download

GPL-3.0

The Requires

  • php >=7.1.0
  • sib-retail/polyfony *

 

by Avatar AnnoyingTechnology

api distance google maps geocoder streetview

08/02 2018

1.0.0

1.0.0.0

Helper to use Google's StreetView, Maps, Distance... APIs

  Sources   Download

GPL-3.0

The Requires

  • php >=7.1.0
  • sib-retail/polyfony *

 

by Avatar AnnoyingTechnology

api distance google maps geocoder streetview