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)43.9k—0%9[1 PRs](https://github.com/heimrichhannot/contao-google-maps-bundle/pulls)1LGPL-3.0-or-laterPHPPHP ^7.4 || ^8.0

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 1mo ago

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_create`:

```
{# 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}}TODO
----

[](#todo)

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

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

[](#documentation)

[Developer documentation](docs/developers.md)

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance66

Regular maintenance activity

Popularity29

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

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

Recently: every ~11 days

Total

75

Last Release

67d 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 (80 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)")[![dmolineus](https://avatars.githubusercontent.com/u/1186266?v=4)](https://github.com/dmolineus "dmolineus (3 commits)")[![heimrich-hannot](https://avatars.githubusercontent.com/u/37208441?v=4)](https://github.com/heimrich-hannot "heimrich-hannot (2 commits)")[![fritzmg](https://avatars.githubusercontent.com/u/4970961?v=4)](https://github.com/fritzmg "fritzmg (2 commits)")[![vvohh](https://avatars.githubusercontent.com/u/75325799?v=4)](https://github.com/vvohh "vvohh (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)")

---

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

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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