Download the PHP package ujamii/ujamii-geocoder without Composer

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

ujamii-geocoder

Packagist

Connecting http://geocoder-php.org/Geocoder with TYPO3 DataHandler API. With this extension you can easily add geo data to records while they are changed by editors in the TYPO3 backend. You just have to configure how your entity "looks like" in the eyes of the geocoder via TCA anf that's it.

Installation

Currently only works in composer mode of TYPO3, so

Usage

Just add a new config array to the ctrl section of your TCA.

And provide a method (e.g. in an entity or helper class) to generate a compound address string based on the database data of one entity (example below).

Options

Those options are possible:

triggerFields (mandatory)

Changes in those fields will trigger the process of geocoding.

getAddressString (mandatory)

A method called via TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction which is supposed to return a complete address string. The first parameter provided to this method is the merged data array (unchanged entity data from db + changed values from the backend form).

Example:

locale (default: de)

The locale which is used in the geocoder.

latField (default: lat)

Name of the target field for the latitude value.

lngField (default: lng)

Name of the target field for the longitude value.

httpClientClass (default: \Http\Adapter\Guzzle6\Client::class)

Class name of the http client, see possible packages

providerClass (default: \Geocoder\Provider\GoogleMaps\GoogleMaps::class)

Class name of the provider, see possible packages

providerParams

Optional parameters for the provider. (e.g. an API key for Google Maps)

geocoderClass (default: \Geocoder\StatefulGeocoder::class)

Class name of the geocoder.

Example

Let's assume the record is a news record in the database with 3 fields: location, lat and lng. The field location contains something like Alexanderplatz, Berlin, Deutschland and lat and lng are the fields you want to be filled automatically as soon as an editor changes the location.

Add this to your typo3conf/ext/your_extension/Configuration/TCA/Overrides/tx_news_domain_model_news.php or typo3conf/ext/your_extension/Configuration/TCA/tx_ext_domain_model_entity.php file.

In YourEntity, add a method like this:

Usage as command or in scheduler

The extension also provides command to populate rows with 0 values for the lat/lng fields. It reads the configuration from TCA and iterates through each configured table, searching with lat = 0 OR lng = 0. For each matching row, the geocoding process is executed and the values are then updated in the database. The command produces some log output to track what has been done.

As it is a default Symfony console command, this can also be called by a scheduler task.

TODOs


All versions of ujamii-geocoder with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^9.5
geocoder-php/google-maps-provider Version ^4.2
php-http/guzzle6-adapter Version ^1.1
php-http/message Version ^1.6
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 ujamii/ujamii-geocoder contains the following files

Loading the files please wait ....