This project is not covered by Drupal’s security advisory policy.

Geofield Map Drupal
Geofield Map Drupal
Geofield Map Drupal
Geofield Map Drupal
Geofield Map Drupal
Geofield Map Drupal

Geofield Map is an advanced, complete and easy-to-use Geo Mapping solution for Drupal 8, based on and fully compatible with the Geofield module, that lets you manage the Geofield with an interactive Map both in back-end and in the front-end.

It represents the perfect solution to:

  • geolocate (with one or more Locations / Geofields) any fieldable Drupal entity throughout an Interactive Geofield Map widget;
  • render each Content's Locations throughout a fully customizable Interactive Geofield Map Formatter;
  • expose and query Contents throughout fully customizable Map Views Integration;
  • implement advanced front-end Google Maps with Marker Icon & Infowindow advanced customizations, custom Google Map Styles and Marker Clustering capabilities;

Alert !

Since 8.x-1.40 version, Geofield Map module requires (depend on) Geofield 8.x-1.0-beta1 version, and older.
Previous versions will still require (and properly work only with) Geofield 8.x-1.0-alpha* versions.


Technical Functionalities and specifications

The actual module release implements the following components:

Geofield Map widget

An highly customizable Map widget,
providing an interactive and very intuitive map on which to perform localization and input of geographic coordinates throughout:

  • MULTIPOINTS Geofield mapping support
  • Google Places autocomplete and Geocoding APIs;
  • Google Map or Leaflet Map JS libraries and interfaces;
  • Map click and marker dragging, with instant reverse geocoding;
  • HTML5 Geolocation of the user position;
  • the possibility to permanently store the Geocoded address into the Entity Title
    or in a "string type" field (among the content's ones);
  • etc.

Geofield Map Formatter

An higly customizable Google Map formatter, by which render and expose the contents Geofields / Geolocations, throughout:

Views Integration

A dedicated Geofield Map View style plugin able to render a Views result on a higly customizable Google Map,
with Marker and Infowindow specifications and Markers Clustering capabilities.

Advanced Google Map and Markeclustering Features for the front-end maps

Both in Geofield Map Formatter and in the Geofield Map View style it is possible:

Installation and Use

Geofield Map module needs to be installed using Composer to manage Drupal site dependencies, which will also download the required Geofield Module dependency and PHP libraries).
It means simply running the following command from your project root (where the main composer.json file is sited):

$ composer require 'drupal/geofield_map'

Once done, you can setup the following:

  • Geofield Widget: In a Content Type including a Geofield Field, go to "Manage form display"
  • and select "Geofield Map" as Geofield Widget. Specify the Widget further settings for both Google or Leaflet Map types;
  • Geofield Google Map Formatter: In a Content Type including a Geofield Field, go to "Manage display" and select "Geofield Google Map" as Geofield field Formatter. Specify the Formatter further settings for specific personalization;
  • Geofield Map Views: In a View Display select the Geofield Google Map Format, and be sure to add a Geofield type field in the fields list. Specify the View Format settings for specific personalization;

Hints for Advanced Use

  • As default (configurable) option, eventual overlapping markers will be Spiderfied, with the support of the Overlapping Marker Spiderfier Library (for Google Maps);
  • The Geofield Map View style plugin will pass to the client js (as drupalSettings.geofield_google_map[mapid] & Drupal.geoFieldMap[mapid] variables) the un-hidden fields values of the View, as markers/features' properties data;

Notes & Warnings

  • The Geofield Map module depends from the Geofield module;
  • A valid Gmap Api Key is needed for Google Maps rendering, and for any Geocoding and Reverse Geocoding functionalities, as actually based on the Google Geocoder;
  • Although in mind, there is no Leaflet Map library support at the moment for the Geofield Map Formatter and the Map Views Plugin. Please refer to the Leaflet and the Leaflet Markercluster modules for Leaflet front-end mapping of Drupal 8 Geofields;


Project information

Downloads