numero2 / contao-storelocator

Contao Plugin for managing stores (or in common address data) and providing a frontend-search based on geo data.
https://www.numero2.de/contao/erweiterungen/storelocator.html
GNU Lesser General Public License v3.0
13 stars 8 forks source link
bing contao4 google-maps heremaps maps nominatim openstreetmap

Contao StoreLocator

License: LGPL v3

About

This extension offers the possibility to create multiple lists containing address data, contact information as well as opening times. From the Frontend the user can enter any possible address to see which stores are nearby (like on Google Maps). Read more

Screenshot

Editing a single store

System requirements

Installation

Using other providers

StoreLocator comes pre-bundled with a provider for Google Maps. If you want to use another provider you'll need to install additional packages:

Package Provider
numero2/contao-storelocator-bing-maps-provider Bing Maps
numero2/contao-storelocator-here-provider HERE Maps
numero2/contao-storelocator-nominatim-provider OpenStreetMap Nominatim
numero2/contao-storelocator-open-cage-provider OpenCage

Events

By default the importer will populate the model with the fields for the current row and the key provided in the first row of the file. For custom handling feel free to use the contao.storelocator_store_import event:

// src/EventListener/StoreImportListener.php
namespace App\EventListener;

use numero2\StoreLocatorBundle\Event\StoreImportEvent;
use numero2\StoreLocatorBundle\Event\StoreLocatorEvents;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;

#[AsEventListener(StoreLocatorEvents::STORE_IMPORT)]
class StoreImportListener {

    public function __invoke( StoreImportEvent $event ): void {
        // …
    }
}