PHPackages                             cowegis/cowegis-contao-geocode-widget-bundle - 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. cowegis/cowegis-contao-geocode-widget-bundle

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

cowegis/cowegis-contao-geocode-widget-bundle
============================================

Cowegis - Content Web GIS Geocode Widget For Contao

1.2.1(3w ago)23.0k↑346.2%31LGPL-3.0-or-laterPHPPHP ^8.2CI passing

Since Sep 12Pushed 3w ago1 watchersCompare

[ Source](https://github.com/cowegis/cowegis-contao-geocode-widget-bundle)[ Packagist](https://packagist.org/packages/cowegis/cowegis-contao-geocode-widget-bundle)[ GitHub Sponsors](https://github.com/dmolineus)[ RSS](/packages/cowegis-cowegis-contao-geocode-widget-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (17)Versions (6)Used By (1)

Cowegis geocode widget
======================

[](#cowegis-geocode-widget)

[![Build Status](https://camo.githubusercontent.com/16062f7ceba22fbe006c7af36f8857395cadab2a509faab43d21fba9653169b3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636f77656769732f636f77656769732d636f6e74616f2d67656f636f64652d7769646765742d62756e646c652f646961676e6f73746963732e796d6c3f6272616e63683d6d6173746572266c6f676f3d676974687562616374696f6e73266c6f676f436f6c6f723d253233666666267374796c653d666c61742d7371756172)](https://github.com/cowegis/cowegis-contao-geocode-widget-bundle/actions)[![Version](https://camo.githubusercontent.com/248d37b4e6de4f108e16b3aa859829daf6bfd88c627e5a53d824973d62ecb698/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65747a6d616368742f636f6e74616f2d6c6561666c65742d67656f636f64652d7769646765742e7376673f7374796c653d666c61742d737175617265)](http://packagist.org/packages/cowegis/cowegis-contao-geocode-widget-bundle)[![License](https://camo.githubusercontent.com/b52287b30ec71970d9249dc76d4e7701ead1cc58b64dc048daf0ac72459621df/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e65747a6d616368742f636f6e74616f2d6c6561666c65742d67656f636f64652d7769646765742e7376673f7374796c653d666c61742d737175617265)](http://packagist.org/packages/cowegis/cowegis-contao-geocode-widget-bundle)[![Downloads](https://camo.githubusercontent.com/f9f0a607126d88f89a13fe15b449ea87a3f3da8bcc29da31bf952ec7e302437f/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e65747a6d616368742f636f6e74616f2d6c6561666c65742d67656f636f64652d7769646765742e7376673f7374796c653d666c61742d737175617265)](http://packagist.org/packages/cowegis/cowegis-contao-geocode-widget-bundle)

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

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

[](#requirements)

- Contao ^4.13||^5.0
- PHP ^8.2

Install
-------

[](#install)

### 1. Install using composer

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

```
php composer.phar require cowegis/cowegis-contao-geocode-widget-bundle
```

### 2. Use the widget

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

#### Coordinates only

[](#coordinates-only)

The widget is used to add a map icon which opens a map in a pop-up. You can enter an address in the search field and press Enter to resolve it. Either a list of suggested addresses is displayed or a marker is placed on the map. The marker can still be positioned using the mouse. Click on the ‘Apply’ button to apply the geocoordinates.

```
$GLOBALS['TL_DCA']['tl_example']['fields']['coordinates'] = [
    'label'     => ['Coordinates', 'Enter the coordinates - comma separated as \'latitude,longitude\'.'],
    'inputType' => 'cowegis_geocode',
    'eval'      => [
        'tl_class' => 'w50',
    ],
    'sql' => 'varchar(255) NOT NULL default \'\''
];
```

However, if you already have input fields for the address, such as postcode, town and street, you don't want to have to enter this information again in the search field in the pop-up.

With the appropriate information in the DCA, you can automatically transfer this information to the search field – here is an example for fields `street`, `zip` and `city` and country fixed as "Deutschland":

```
$GLOBALS['TL_DCA']['tl_example']['fields']['coordinates'] = [
    'label'     => ['Coordinates', 'Enter the coordinates - comma separated as \'latitude,longitude\'.'],
    'inputType' => 'cowegis_geocode',
    'eval'      => [
        'query_pattern'    => '#ctrl_street# #ctrl_zip# #ctrl_city#, Deutschland',
        'url_template'     => 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
        'attribution'      => 'Tiles style by Humanitarian OpenStreetMap Team hosted by OpenStreetMap France'.
        'tl_class'         => 'w50',
    ],
    'sql' => 'varchar(255) NOT NULL default \'\''
];
```

The information is as follows:

- `query_pattern`: Pattern as it appears in the search input in the pop-up - the field IDs with `##`
- `url_template`: Template for the map
- `attribution`: Note on the map layer

#### 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 simple 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'     => ['Coordinates', 'Enter the coordinates - comma separated as \'latitude,longitude\'.'],
    'inputType' => 'cowegis_geocode',
    'eval'      => [
        'tl_class' => 'w50',
        'radius'   => 'radius'
    ],
    'sql' => 'varchar(255) NOT NULL default \'\''
];

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

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

```
$GLOBALS['TL_DCA']['tl_page']['fields']['radius'] = [
    'label'     => ['Radius', 'Specification of the radius in metres.'],
    'inputType' => 'cowegis_radius',
    'eval'      => [
        'rgxp'        => 'natural',
        'default'     => 500,
        'minval'      => 100,
        'maxval'      => 5000,
        'tl_class'    => 'w50 wizard',
        'coordinates' => 'coordinates'
    ],
    'sql' => 'varchar(255) NOT NULL default \'\''
];
```

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance95

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.6% 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 ~209 days

Total

4

Last Release

25d ago

### 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 (53 commits)")[![zonky2](https://avatars.githubusercontent.com/u/1045318?v=4)](https://github.com/zonky2 "zonky2 (11 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![qzminski](https://avatars.githubusercontent.com/u/193483?v=4)](https://github.com/qzminski "qzminski (2 commits)")[![Toflar](https://avatars.githubusercontent.com/u/481937?v=4)](https://github.com/Toflar "Toflar (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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