-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleafletjs.module
More file actions
executable file
·38 lines (34 loc) · 949 Bytes
/
leafletjs.module
File metadata and controls
executable file
·38 lines (34 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* @file
* Main module file for LeafletJS.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function leafletjs_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.leafletjs':
$output = '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Displays interactive Leaflet map with marker clustering.') . '</p>';
$output .= '<h3>' . t('Usage') . '</h3>';
$output .= '<ul>';
$output .= '<li>' . t('Add the "LeafletJS" block to any region via Structure > Block Layout') . '</li>';
$output .= '<li>' . t('Or visit /leafletjs to see the dedicated page') . '</li>';
$output .= '</ul>';
return $output;
}
}
/**
* Implements hook_theme().
*/
function leafletjs_theme($existing, $type, $theme, $path) {
return [
'leafletjs' => [
'variables' => [
'map_height' => '600px',
],
],
];
}