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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package geocoder

Geocode addresses to coordinates

Latest Version run-tests 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

Learn how to create a package like this one, by watching our premium video course:

Laravel Package training

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.


All versions of geocoder with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
illuminate/support Version ^6.0|^7.0|^8.67|^9.0|^10.0|^11.0
guzzlehttp/guzzle Version ^6.5|^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package spatie/geocoder contains the following files

Loading the files please wait ....