Skip to content

drwpow/PHP_Geocoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

# PHP Geocoder

A simple function that passes a request to the Google Geocoding API and returns an object formatted for PHP.
In case that fails, it falls back to Yahoo!’s API.
Can be used to gather latitude/longitude coordinates for any given address/pseudo-address (or best guess),
as well as supply missing information (eg, Zip Codes) for any given partial address.

## Notes:
Mostly used to take any input and turn into a lat/lng coordinate.
For that reason, a PHP object is returned with "lat" and "lng".
To return the entire object, set $coordonly to FALSE.

Uses the Google Geocoding API (2500 requests / day), but if that fails, it
falls back to Yahoo! (50,000 / day).

$latLng and $bounds are used only by Google's Geocoding API. For more
information on that, refer to the documentation on "Viewport Biasing."


For more information, see Google's documentation here: https://developers.google.com/maps/documentation/geocoding/
and Yahoo's documentation here: http://developer.yahoo.com/geo/placefinder/guide/index.html

About

Basic Google Geocoding API for PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages