Download the PHP package pdir/geocode-cache-bundle without Composer
On this page you can find all versions of the php package pdir/geocode-cache-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pdir/geocode-cache-bundle
More information about pdir/geocode-cache-bundle
Files in pdir/geocode-cache-bundle
Package geocode-cache-bundle
Short Description GeoCode Cache bundle for Contao 4
License LGPL-3.0-or-later
Informations about the package geocode-cache-bundle
GeoCode Bundle extension for Contao 4
About
The extension adds a new route /api/geocode/ to Contao and determines the latitude and longitude of an address.
As a service, the OpenCage geocoder is used. 2000 requests per day are free - see https://opencagedata.com/pricing.
All requests are stored in a database table.
Deutsch
Die Erweiterung fügt eine neue Route api/geocode zu Contao hinzu und ermittelt die Latitude und Longitude Angaben einer Adresse.
Als Dienst wird der OpenCage Geocoder verwendet. 2000 Anfrage pro Tag sind frei - see https://opencagedata.com/pricing.
Alle Anfragen werden in einer Datenbanktabelle gespeichert.
Example
Calling https://example.org/api/geocode/Ringstraße+9+28309+Bremen returns the following Json:
{ "lat": "53.0529439", "lng": "8.887199"}
Set API key and other parameters
app/config/parameters.yml
parameters:
pdir_gcb_opengage_api_key: INSERT_YOUR_OPENCAGE_API_KEY_HERE
pdir_gcb_cache_time: 1 day (default is 1 hour if noting is set)
System requirements
- Contao 4.0 or higher
Installation & Configuration
Dependencies
License
GNU Lesser General Public License v3.0
Tests & Coding Standard Checks
Run the PHP-CS-Fixer and the unit test before you release your bundle:
All versions of geocode-cache-bundle with dependencies
contao/core-bundle Version ^4.4
symfony/framework-bundle Version ^3.3 || ^4.4
opencage/geocode Version ^2.1