Download the PHP package spatie/geocoder without Composer
On this page you can find all versions of the php package spatie/geocoder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download spatie/geocoder
More information about spatie/geocoder
Files in spatie/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:
Support us
Learn how to create a package like this one, by watching our premium video course:
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Installation
You can install this package through composer.
Laravel installation
Though 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 you must manually install 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.
You can also get all the results instead of the first one
This is how you can reverse geocode coordinates to addresses.
You can also reverse geocode coordinates to all the related 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 result_not_found
Credits
- Freek Van der Herten
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of geocoder with dependencies
illuminate/support Version ^6.0|^7.0|^8.67|^9.0|^10.0|^11.0
guzzlehttp/guzzle Version ^6.5|^7.0