org_heigl/geolocation

Provides a form-element for locating a spot on the earth and providing Latitude/Longitude-values


README

Build Status Coverage Status Dependency Status Scrutinizer Code Quality Code Climate Codacy Badge

Latest Stable Version Total Downloads License composer.lock

Geolocation-FormElement

This module provides a form-element for Latitude/Longitude-values.

This element adds a map into your form where you can select any location on earth by simply clicking onto it on a map. The form-element is hidden but without JS it is still displayed so that you still can insert Latitude-Longitude values like so:

50.1234,8.1234

Later on this element will provides a search form so you can search for adresses.

Installation

The module is best installed using composer

    composer require org_heigl/geolocation

Prerequisites

  1. Add Org_Heigl\Geolocation to the list of your enabled modules.

        return [
            'modules' => [
               …       
               'Org_Heigl\Contact',
               …
            ]
        ];
  2. The content of the public-folder needs to be available to the public. When you use the AssetManager-Module that is already taken care of.

  3. This module also needs a working jQuery available. You will have to take care about that yourself!

Usage

After installation you should be able to add a form-element Geolocation to your forms right away like the following example:

$form = new Zend\Form();
$form->addElement('geolocation');