Download the PHP package lase-peco/geocoder without Composer

On this page you can find all versions of the php package lase-peco/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

geocoder

Latest Version on Packagist Total Downloads

A small geocoder library for laravel.

Notes

This whole package is depending on the API nominatim.org.

Installation

You can install the package via composer:

Then publish the config file with the following command:

The API from nominatim has a request limit of an absolute maximum of 1 request per second. this is defined in th config file, which you can change at your on risk. you can read about it under operations.osmfoundation.org/policies.

Also in the config file you can define how long should this library cache the results of your searches. The default is one Month.

Usage

With the help of the facade you can call two main functions and .

The search function

You can call the function on the facade and provide it directly with the address.

this kind of search 'Free-form query' process the provided (string) address first left-to-right and then right-to-left if that fails. So you may search for as well as for .

Commas are optional, but improve performance by reducing the complexity of the search.

You can also provide the search function with a part of the address,but the result might not be accurate.

It will return a default json response with the results for the provided address which is accessible as a collection:

Furthermore, you can provide the function with a new object of the class, through which you can construct the address:

This method is preferred to enable the API to find the address better and faster.


The reverse function

With the function you can reverse search the address with the help of its latitude and longitude:

It will return the same default json response which is accessible as a collection.


Further functions

All the following functions are able to be used with the and functions.

withAddressDetails()

If you call the ` on the facade you will get the address detailed:

withExtraTags()

If you call the ` on the facade you will get extra tag for the address:

language()

Call the function on the facade with the language as a parameter to translate the result of the search.

withNameDetails()

Call the function on the facade with the language as a parameter to translate the result of the search.

format()

This package supports the following formats: ,,,,.

Call the function on the facade with the desired format as a parameter.

For the formats and there is two functions that you can call and .

Testing

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

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 ^8.0
guzzlehttp/guzzle Version ^7.3
illuminate/config Version ^8.0||^9.0
illuminate/support Version ^8.0||^9.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 lase-peco/geocoder contains the following files

Loading the files please wait ....