2017 © Pedro Peláez
 

library google-geocoding

Google Geocoding SDK

image

p2/google-geocoding

Google Geocoding SDK

  • Tuesday, September 24, 2013
  • by phillies2k
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Google Geocoding

v0.9.7, (*1)


<?php use P2\GoogleGeocoding\Geolocation\Component; use P2\GoogleGeocoding\Geolocation\Factory; use P2\GoogleGeocoding\GoogleGeocoding; // the address to look up $address = '123 5th Avenue ny'; // create the response factory // you may specify the class names for each response object $factory = new Factory( 'Acme\CustomBundle\Document\Geolocation', 'Acme\CustomBundle\Document\Geolocation\AddressComponent', 'Acme\CustomBundle\Document\Geolocation\Geometry', 'Acme\CustomBundle\Document\Geolocation\Viewport', 'Acme\CustomBundle\Document\Geolocation\Location', ); // initialize the service $googleGeocoding = new GoogleGeocoding($factory, GoogleGeocoding::FORMAT_JSON); header('Content-Type: text/plain; charset=utf-8'); echo "\n\nGeocoding (looking up: {$address})\n\n"; // geocoding $geolocations = $googleGeocoding->findByAddress($address); foreach ($geolocations as $geolocation) { echo $geolocation->getFormattedAddress() . "\n"; } echo "\n\nReverse Geocoding:\n\n"; // reverse geo coding $geolocations = $googleGeocoding->findByCoordinates(12.128462, 34.924239); foreach ($geolocations as $geolocation) { echo "* " . $geolocation->getFormattedAddress() . "\n"; }

The Versions

24/09 2013

dev-master

9999999-dev https://github.com/phillies2k/google-geocoding

Google Geocoding SDK

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Philipp Boes

geocoding google sdk