Download the PHP package geocodio/geocodio-library-php without Composer
On this page you can find all versions of the php package geocodio/geocodio-library-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download geocodio/geocodio-library-php
More information about geocodio/geocodio-library-php
Files in geocodio/geocodio-library-php
Package geocodio-library-php
Short Description geocod.io geocoding API library
License MIT
Homepage https://github.com/geocodio/geocodio-library-php
Informations about the package geocodio-library-php
geocod.io PHP library
Library for performing forward and reverse address geocoding for addresses or coordinates in the US and Canada.
- Installation
- Usage
- Single geocoding
- Batch geocoding
- Field appends
- Address components
- Limit results
- Usage with Laravel
- Testing
- Changelog
- Security
- License
Installation
You can install the package via composer:
Using Laravel? Great! There's an optional Laravel service provider, for easy integration into your app.
Usage
Don't have an API key yet? Sign up at https://dash.geocod.io to get an API key. The first 2,500 lookups per day are free.
Single geocoding
Using the Laravel integration? Check out Laravel-specific usage examples below.
Note: You can read more about accuracy scores, accuracy types, input formats and more at https://www.geocod.io/docs/
Batch geocoding
To batch geocode, simply pass an array of addresses or coordinates instead of a single string
Field appends
Geocodio allows you to append additional data points such as congressional districts, census codes, timezone, ACS survey results and much much more.
To request additional fields, simply supply them as an array as the second parameter
Address components
For forward geocoding requests it is possible to supply individual address components instead of a full address string. This works for both single and batch geocoding requests.
Limit results
Optionally limit the number of maximum geocoding results by using the third parameter on geocode(...)
or reverse(...)
Usage with Laravel
This library works well without Laravel, but if you happen to be using Laravel you can enjoy a few Laravel-specific features.
The package will be auto-discovered by newer Laravel versions, so the only thing left to do is to publish the config file
You can now go ahead and edit your config file at config/geocodio.php
.
You will now be able to use the Geocodio
facade, or dependency inject the fully-configured Geocodio
class.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.