This project is not covered by Drupal’s security advisory policy.
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.
Project information
- Project categories: Content editing experience, Developer tools, Site structure
- Ecosystem: Templates
19 sites report using this module
- Created by dataweb on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.





