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.

Please rate this library. Is it a good library?

All versions of geocoder with dependencies

Informations about the package geocoder

Geocode addresses to coordinates

Latest Version GitHub Workflow Status Check & fix styling Total Downloads

This package can convert any address to GPS coordinates using Google's geocoding service. Here's a quick example:

Support us

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:

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

License

The MIT License (MIT). Please see License File for more information.


Version
Requires php Version ^7.2|^8.0
illuminate/support Version ^6.0|^7.0|^8.0
guzzlehttp/guzzle Version ^6.5|^7.0

The package spatie/geocoder contains the following files

Loading the files please wait ....