-
Notifications
You must be signed in to change notification settings - Fork 0
/
mod_airmap.php
27 lines (25 loc) · 1.02 KB
/
mod_airmap.php
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
<?php
/**
* Air Quality Map Module
* @link https://www.nordmograph.com/extensions
* @copyright Copyright (C) 2017 Adrien Roussel nordmograph.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
// no direct access
defined('_JEXEC') or die;
$class_sfx = htmlspecialchars($params->get('class_sfx'));
$latitude = htmlspecialchars($params->get('latitude','50'));
$longitude = htmlspecialchars($params->get('longitude','3'));
$zoom = htmlspecialchars($params->get('zoom','10'));
$width = $params->get('width','100%');
$height = $params->get('width','400px');
$apikey = $params->get('apikey');
$token = $params->get('token');
$aqi = $params->get( 'aqi', 'usepa-aqi');
$http = $params->get( 'http', 'http');
$geoloc = $params->get( 'geoloc', 1);
$doc = JFactory::getDocument();
$doc->addStylesheet(JURI::base().'modules/mod_airmap/css/style.css');
if($apikey)
$doc->addScript('//maps.googleapis.com/maps/api/js?key='.$apikey );
require(JModuleHelper::getLayoutPath('mod_airmap', $params->get('layout', 'default')));