This project is not covered by Drupal’s security advisory policy.
Introduction
This module integrates Datamaps library into
Drupal.
Requirements
None, dependencies are bundled with the module.
Installation
As any other Drupal (8 or later) module, from your terminal run
composer require drupal/datamaps:^1.0
Configuration
To access module configuration go to /admin/config/user-interface/datamaps
there you can select which datamaps should be available as libraries, whereas
you want to use high-resolution maps (if available) and CDN option for
libraries.
Usage
The module provides a render element datamap once set will include the proper libraries and instantiate the map.
$element['datamap'] = [
'#type' => 'datamap',
'#datamaps' => [
'variant' => 'usa',
'options' => [
'height' => '300px',
'width' => '300px',
],
],
];
Currently only world and usa variants are supported. The world variant comes with high-resolution maps.
Library support
Since this currently is not possible to declare
libraries as dependencies, thus dependencies are declared using CDN (default) but are included also as local copies.
Version support
Library | Version |
---|---|
D3 | 3.5.3 |
TopoJSON | 1.6.9 |
Datamaps | 0.5.9 |
Icon attribution
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Module categories: Developer Tools
- Created by d70rr3s on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.