Download the PHP package axelb/geocoder without Composer
On this page you can find all versions of the php package axelb/geocoder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download axelb/geocoder
More information about axelb/geocoder
Files in axelb/geocoder
Package geocoder
Short Description Geocoding addresses to coordinates
License MIT
Homepage https://github.com/spatie/geocoder
Informations about the package geocoder
Geocode addresses to coordinates
This package can convert any address to GPS coordinates using Google's geocoding service. Here's a quick example:
Installation
You can install this package through composer.
Laravel installation
Thought the package works fine in non-Laravel projects we included some niceties for our fellow artistans.
In Laravel 5.5 the package will autoregister itself. In older versions of Laravel your must manually installed the service provider and facade.
Next, you must publish the config file :
This is the content of the config file:
Usage
Here's how you can use the Geocoder.
You can get the result back in a specific language.
This is how you can reverse geocode coordinates to addresses.
If you are using the package with Laravel, you can simply call getCoordinatesForAddress
.
The accuracy key can contain these values:
ROOFTOP
RANGE_INTERPOLATED
GEOMETRIC_CENTER
APPROXIMATE
You can read more information about these values on the Google Geocoding API Page
When an address is not found accuracy and formatted_address will contain NOT_FOUND
Postcardware
You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.
We publish all received postcards on our company website.
Credits
- Freek Van der Herten
- All Contributors
Support us
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.
License
The MIT License (MIT). Please see License File for more information.