PHPackages                             heimrichhannot/contao-google-maps-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. heimrichhannot/contao-google-maps-bundle

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

heimrichhannot/contao-google-maps-bundle
========================================

This bundle adds google maps integration to Contao.

2.11.2(1y ago)44.2k↑233.3%10[1 issues](https://github.com/heimrichhannot/contao-google-maps-bundle/issues)[1 PRs](https://github.com/heimrichhannot/contao-google-maps-bundle/pulls)1LGPL-3.0-or-laterPHPPHP ^7.4 || ^8.0CI passing

Since May 15Pushed 3mo ago6 watchersCompare

[ Source](https://github.com/heimrichhannot/contao-google-maps-bundle)[ Packagist](https://packagist.org/packages/heimrichhannot/contao-google-maps-bundle)[ RSS](/packages/heimrichhannot-contao-google-maps-bundle/feed)WikiDiscussions v3 Synced yesterday

READMEChangelog (10)Dependencies (15)Versions (77)Used By (1)

Contao Google Maps Bundle
=========================

[](#contao-google-maps-bundle)

[![](https://camo.githubusercontent.com/e0b7f590f0887927de3b1de08b2715620e6eba6cda915c29811fbf157c35a5c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6865696d7269636868616e6e6f742f636f6e74616f2d676f6f676c652d6d6170732d62756e646c652e737667)](https://camo.githubusercontent.com/e0b7f590f0887927de3b1de08b2715620e6eba6cda915c29811fbf157c35a5c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6865696d7269636868616e6e6f742f636f6e74616f2d676f6f676c652d6d6170732d62756e646c652e737667)[![](https://camo.githubusercontent.com/0d1b4250bf2fad5c75c9b5ff3c956ff7040a967457d7231874a5179cc35ab1af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6865696d7269636868616e6e6f742f636f6e74616f2d676f6f676c652d6d6170732d62756e646c652e737667)](https://camo.githubusercontent.com/0d1b4250bf2fad5c75c9b5ff3c956ff7040a967457d7231874a5179cc35ab1af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6865696d7269636868616e6e6f742f636f6e74616f2d676f6f676c652d6d6170732d62756e646c652e737667)

This bundle adds google maps integration to [Contao](https://contao.org/de/). It's based on [ivory/google-map](https://github.com/bresam/ivory-google-map).

Features
--------

[](#features)

- introduces a simple Contao backend entity to configure your Google Map and overlays (markers, info windows, ...)
- frontend module and content element
- insert tag and twig function
- easy contao command based migration tool for [delahaye/dlh\_googlemaps](https://github.com/delahaye/dlh_googlemaps) (courtesy to delahaye!)
- responsive support (mobile first), provide responsive configurations that will update the map upon reaching the value (greater than breakpoint)
- support for [hofff/contao-consent-bridge](https://github.com/hofff/contao-consent-bridge)
- support for [Oveleon Cookiebar](https://packagist.org/packages/oveleon/contao-cookiebar)

Setup and usage
---------------

[](#setup-and-usage)

### Setup

[](#setup)

1. Install with contao manager or composer and update database afterwards

    ```
    composer require heimrichhannot/contao-google-maps-bundle

    ```
2. Optional: If you have already google maps created with [delahaye/dlh\_googlemaps](https://github.com/delahaye/dlh_googlemaps) refer to the section "Migrating from dlh\_googlemaps".
3. Set your Google API key (capable of Google Maps and Google Static Maps) if not already done in one of the following places (ascending priority):

    - global Contao settings (`tl_settings`)
    - page root (`tl_page`)
    - Google Maps config (`tl_google_map`)

### Usage

[](#usage)

1. Create a Google Map using the corresponding menu entry in Contao on the left.
2. Optional: create markers with the created google map configuration (markers are child entities of a map)
3. Now you can integrate the map in your website using one of the following build-in ways:
    - Content element
    - Module
    - Insert tag (see below)
    - Twig function (see below)

### Twig

[](#twig)

To render your map in a twig template, use `google_map` function:

```
{# The shortest way: #}
{{ google_map(2) }}

{# There are more possiblities: #}
{% set map = google_map(2)
    .addOverlays(overlays)          {# set overlays dynamically (pass as array|Collection #}
    .build()                        {# build the map, is needed before working with overlays/ markers #}
 %}

{# Create link to trigger a marker (typically open info window #}

    Trigger marker id {{ map.marker(overlays[1].id).variable }}

{# Render the map #}
{{ map }}

{# Or render only html, css or js #}
{{ map.html }}
{{ map.css }}
{{ map.js }}
```

Migrating from dlh\_googlemaps
------------------------------

[](#migrating-from-dlh_googlemaps)

Although we cannot guarantee to fully migrate your existing dlh\_googlemaps instances, you will nevertheless have a point to start from. Think of it as a 95% migration ;-)

Migrating is as simple as running `vendor/bin/contao-console huh:google-maps:migrate-dlh` from your contao root dir. Your dlh google maps are not changed by this process, only new instances in `tl_google_map` and `tl_google_map_overlay` are created out of the existing legacy data.

Insert Tags
-----------

[](#insert-tags)

NameArgumentsExamplegoogle\_mapID of the `tl_google_map` instance{{google\_map::1}}google\_map\_htmlID of the `tl_google_map` instance{{google\_map\_html::1}}google\_map\_cssID of the `tl_google_map` instance{{google\_map\_css::1}}google\_map\_jsID of the `tl_google_map` instance{{google\_map\_js::1}}Integrations
------------

[](#integrations)

### Oveleon Cookiebar

[](#oveleon-cookiebar)

This extension comes with a build-in cookie type for the [Oveleon Cookiebar](https://packagist.org/packages/oveleon/contao-cookiebar)that you can use to easily integrate the cookie bar with the google maps bundle. Just create a cookie type of type "Google Maps (Google Maps Bundle)" and you're done.

TODO
----

[](#todo)

- Overlay types:
    - polyline
    - circle
    - rectangle
    - ground\_overlay

Documentation
-------------

[](#documentation)

[Developer documentation](docs/developers.md)

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance58

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 68.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 ~38 days

Recently: every ~11 days

Total

75

Last Release

113d ago

Major Versions

0.3.0 → 1.0.02019-06-05

1.4.1 → 2.0.0-beta12020-04-28

v1.x-dev → 2.0.0-beta52020-06-24

v2.x-dev → 3.0.0-beta12026-01-26

PHP version history (5 changes)0.0.1PHP ^7.1

2.0.0-beta15PHP ^7.1 || ^8.0

2.0.0PHP ^7.1||^8.0

2.6.0PHP ^7.4 || ^8.0

3.0.0-beta1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/28ad3224d8727b622ebd229840eea6b9dbcb83eb0bd609e6ce65b614830ff538?d=identicon)[digitales@heimrich-hannot.de](/maintainers/digitales@heimrich-hannot.de)

---

Top Contributors

[![koertho](https://avatars.githubusercontent.com/u/12064642?v=4)](https://github.com/koertho "koertho (82 commits)")[![rabauss](https://avatars.githubusercontent.com/u/14016098?v=4)](https://github.com/rabauss "rabauss (12 commits)")[![Defcon0](https://avatars.githubusercontent.com/u/1485098?v=4)](https://github.com/Defcon0 "Defcon0 (6 commits)")[![salteax](https://avatars.githubusercontent.com/u/46114448?v=4)](https://github.com/salteax "salteax (5 commits)")[![heimrich-hannot](https://avatars.githubusercontent.com/u/37208441?v=4)](https://github.com/heimrich-hannot "heimrich-hannot (3 commits)")[![dmolineus](https://avatars.githubusercontent.com/u/1186266?v=4)](https://github.com/dmolineus "dmolineus (3 commits)")[![fritzmg](https://avatars.githubusercontent.com/u/4970961?v=4)](https://github.com/fritzmg "fritzmg (2 commits)")[![yarekpietrasina](https://avatars.githubusercontent.com/u/53605886?v=4)](https://github.com/yarekpietrasina "yarekpietrasina (1 commits)")[![JarekYaro](https://avatars.githubusercontent.com/u/53605886?v=4)](https://github.com/JarekYaro "JarekYaro (1 commits)")[![mirkogleibe](https://avatars.githubusercontent.com/u/850300?v=4)](https://github.com/mirkogleibe "mirkogleibe (1 commits)")[![operatorone](https://avatars.githubusercontent.com/u/4036452?v=4)](https://github.com/operatorone "operatorone (1 commits)")[![qzminski](https://avatars.githubusercontent.com/u/193483?v=4)](https://github.com/qzminski "qzminski (1 commits)")[![vvohh](https://avatars.githubusercontent.com/u/75325799?v=4)](https://github.com/vvohh "vvohh (1 commits)")

---

Tags

contaogooglemaps

### Embed Badge

![Health badge](/badges/heimrichhannot-contao-google-maps-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/heimrichhannot-contao-google-maps-bundle/health.svg)](https://phpackages.com/packages/heimrichhannot-contao-google-maps-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M386](/packages/easycorp-easyadmin-bundle)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[shopware/storefront

Storefront for Shopware

684.6M236](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[contao-community-alliance/dc-general

Universal data container for Contao

1680.8k90](/packages/contao-community-alliance-dc-general)

PHPackages © 2026

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