Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

GGL Map

No security coverage Under active development 19 sites

The GGL map module makes it easy to add Google Maps to your site. It allows you to customize markers, popups, clustering, and location search with flexible default settings.

Introduction

The 'GGL map' module makes the implementation of a Google map super easy. You only need some basic template rendering knowledge.

The module comes with a complete set of default settings that can be overridden with a specific map implementation.

The only setting that you have to provide yourself is a Google Maps API key. Check out the configuration page for that.

Key features

  • default or custom marker via one ore more collections
  • popup content via collection or separate JSON
  • option for clustering
  • option for location search and current location position (based on browser settings)
  • JS triggers do add some project specific JS (E.g. on map loaded, marker click, popup close, ...).
  • AJAX Commands to add some project specific code in AJAX callbacks.

#ggl_map template

All rendering is done via one render array. With that template you have one required #collection parameter. With that parameter you determine the marker collection(s) to load.

The #overrideSettings parameter is optional but with that parameter you can override all the default settings the module comes with.

An example of such a render array:

[
  "#theme" => "ggl_map",
  '#collection' => [
    [
      'id' => 'single_map',
      'url' => '/modules/contrib/ggl_map/examplesdata/single_collection.json',
    ],
  ],
  '#overrideSettings' => [
    'location' => [
      'enableCurrentLocation' => FALSE,
    ],
    'map' => [
      'zoomControlOptions' => [
        'position' => 'google.maps.ControlPosition.TOP_RIGHT',
      ],
      'fitMapToMarkers' => TRUE,
    ],
    'marker' => [
      'onOpenPopup' => [
        'centerToMarker' => TRUE,
        'zoomToMarker' => TRUE,
      ],
    ],
  ],
]

Start with the examples

You only need the 'GGL map' module for a Google map implementation but it is a good idea to check out the 'GGL map examples' module first. It makes it even more easy :-)

After enabling the examples module you can start here: /ggl_map_examples/single_map.

Drupal 9–11

Ask your assistant about GGL Map

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • multiple_fields_remove_button Drupal core
  • yaml_editor Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
30
Tracked since
Apr 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.1.0 Stable 9–11 May 22, 2024
1.0.0 Stable 9–10 Feb 2, 2024
1.0.0-alpha40 Pre-release 9–10 Jan 13, 2024
1.0.0-alpha39 Pre-release 9–10 Jan 11, 2024
1.0.0-alpha38 Pre-release 9–10 Jan 11, 2024
1.0.0-alpha37 Pre-release 9–10 Jan 10, 2024
1.0.0-alpha36 Pre-release 9–10 Jan 10, 2024
1.0.0-alpha35 Pre-release 9–10 Jan 5, 2024
1.0.0-alpha34 Pre-release 9–10 Jan 4, 2024
1.0.0-alpha33 Pre-release 9–10 Dec 31, 2023