PHPackages                             netzmacht/contao-leaflet-geocode-widget - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. netzmacht/contao-leaflet-geocode-widget

ActiveContao-bundle[Utility &amp; Helpers](/categories/utility)

netzmacht/contao-leaflet-geocode-widget
=======================================

Geocode widget based on Leaflet

1.4.0(3y ago)015.7k↓55.6%1[1 PRs](https://github.com/netzmacht/contao-leaflet-geocode-widget/pulls)2LGPL-3.0-or-laterPHPPHP ^7.4 || ^8.0

Since Jan 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/netzmacht/contao-leaflet-geocode-widget)[ Packagist](https://packagist.org/packages/netzmacht/contao-leaflet-geocode-widget)[ GitHub Sponsors](https://github.com/dmolineus)[ RSS](/packages/netzmacht-contao-leaflet-geocode-widget/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (9)Versions (9)Used By (2)

Leaflet geocode widget
======================

[](#leaflet-geocode-widget)

[![Build Status](https://camo.githubusercontent.com/0814343af01045a09d8f64520b6739e107e400e53c11ca63609927db537ec873/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6e65747a6d616368742f636f6e74616f2d6c6561666c65742d67656f636f64652d7769646765742f436f64652532305175616c697479253230446961676e6f73746963733f6c6f676f3d676974687562616374696f6e73266c6f676f436f6c6f723d253233666666267374796c653d666f722d7468652d6261646765)](https://github.com/netzmacht/contao-leaflet-geocode-widget/actions)[![Version](https://camo.githubusercontent.com/248d37b4e6de4f108e16b3aa859829daf6bfd88c627e5a53d824973d62ecb698/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65747a6d616368742f636f6e74616f2d6c6561666c65742d67656f636f64652d7769646765742e7376673f7374796c653d666c61742d737175617265)](http://packagist.org/packages/netzmacht/contao-leaflet-geocode-widget)[![License](https://camo.githubusercontent.com/b52287b30ec71970d9249dc76d4e7701ead1cc58b64dc048daf0ac72459621df/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e65747a6d616368742f636f6e74616f2d6c6561666c65742d67656f636f64652d7769646765742e7376673f7374796c653d666c61742d737175617265)](http://packagist.org/packages/netzmacht/contao-leaflet-geocode-widget)[![Downloads](https://camo.githubusercontent.com/f9f0a607126d88f89a13fe15b449ea87a3f3da8bcc29da31bf952ec7e302437f/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e65747a6d616368742f636f6e74616f2d6c6561666c65742d67656f636f64652d7769646765742e7376673f7374796c653d666c61742d737175617265)](http://packagist.org/packages/netzmacht/contao-leaflet-geocode-widget)

This extension provides a widget to pick coordinates from a map. It uses the leaflet framework.

Changlog
--------

[](#changlog)

See [CHANGELOG](CHANGELOG.md).

Requirements
------------

[](#requirements)

- Contao ^4.13||^5.0
- PHP ^7.4||^8.0

Install
-------

[](#install)

### 1. Install using composer

[](#1-install-using-composer)

```
php composer.phar require netzmacht/contao-leaflet-geocode-widget
```

### 2. Update your AppKernel.php

[](#2-update-your-appkernelphp)

git If you use the managed edition of Contao you can skip this step.

```
  // Dependency is automatically installed and has to be registered
  new Contao\CoreBundle\HttpKernel\Bundle\ContaoModuleBundle('leaflet-libs', $this->getRootDir()),

  // Register the bundle
  new Netzmacht\Contao\Leaflet\GeocodeWidget\LeafletGeocodeWidgetBundle(),
```

### 3. Update the assets

[](#3-update-the-assets)

```
bin/console assets:install --symlink
```

### 4. Use the widget

[](#4-use-the-widget)

#### Coordinates only

[](#coordinates-only)

```
$GLOBALS['TL_DCA']['tl_example']['fields']['coordinates'] = [
    'label'     => ['Koordinaten', 'Geben Sie die Koordinaten ein'],
    'inputType' => 'leaflet_geocode',
    'eval'      => [
        'tl_class' => 'w50',
    ],
    'sql' => 'varchar(255) NOT NULL default \'\''
];
```

#### Coordinates and radius

[](#coordinates-and-radius)

To pick the radius in meters as well, you have to configure the `eval.radius` option for the related radius field. The radius field should be a simle text input. The `default`, `minval` and `maxval` flags are passed to the geocode widget so that only radius in that boundary can be chosen.

```
$GLOBALS['TL_DCA']['tl_page']['fields']['coordinates'] = [
    'label'     => ['Koordinaten', 'Geben Sie die Koordinaten ein'],
    'inputType' => 'leaflet_geocode',
    'eval'      => [
        'tl_class' => 'w50',
        'radius'   => 'radius'
    ],
    'sql' => 'varchar(255) NOT NULL default \'\''
];

$GLOBALS['TL_DCA']['tl_page']['fields']['radius'] = [
    'label'     => ['Radius', 'Angabe des Radius in Metern'],
    'inputType' => 'leaflet_radius', // Optional, you can use a text widget as well
    'eval'      => [
        'default'  => 500,
        'minval'   => 100,
        'maxval'   => 5000,
        'steps'    => 100, // Round value to the closest 100m.
        'tl_class' => 'w50',
    ],
    'sql' => 'varchar(255) NOT NULL default \'\''
];
```

If you want to add an wizard icon to the radius field as well, you only have to reference the coordinates field.

```
$GLOBALS['TL_DCA']['tl_page']['fields']['radius'] = [
    'label'     => ['Radius', 'Angabe des Radius in Metern'],
    'inputType' => 'leaflet_radius',
    'eval'      => [
        'rgxp'        => 'natural',
        'default'     => 500,
        'minval'      => 100,
        'maxval'      => 5000,
        'tl_class'    => 'w50 wizard',
        'coordinates' => 'coordinates'
    ],
    'sql' => 'varchar(255) NOT NULL default \'\''
];
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~426 days

Recently: every ~470 days

Total

6

Last Release

1260d ago

PHP version history (3 changes)1.0.0PHP &gt;=5.5.0

1.1.0PHP &gt;=5.6.0

1.4.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8189209?v=4)[netzmacht](/maintainers/netzmacht)[@netzmacht](https://github.com/netzmacht)

---

Top Contributors

[![dmolineus](https://avatars.githubusercontent.com/u/1186266?v=4)](https://github.com/dmolineus "dmolineus (50 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![qzminski](https://avatars.githubusercontent.com/u/193483?v=4)](https://github.com/qzminski "qzminski (2 commits)")

---

Tags

contaowidgetleafletgeocode

### Embed Badge

![Health badge](/badges/netzmacht-contao-leaflet-geocode-widget/health.svg)

```
[![Health](https://phpackages.com/badges/netzmacht-contao-leaflet-geocode-widget/health.svg)](https://phpackages.com/packages/netzmacht-contao-leaflet-geocode-widget)
```

###  Alternatives

[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[codefog/contao-news_categories

News Categories bundle for Contao Open Source CMS

3183.3k6](/packages/codefog-contao-news-categories)[mvo/contao-group-widget

Adds a new group widget that allows repeating a set of DCA fields.

28124.3k31](/packages/mvo-contao-group-widget)[netzmacht/contao-leaflet-maps

Contao Leaflet maps integration

1111.0k1](/packages/netzmacht-contao-leaflet-maps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
