| Current Path : /home/juvelize/www/modules/mod_sp_simple_map/ |
| Current File : /home/juvelize/www/modules/mod_sp_simple_map/mod_sp_simple_map.php |
<?php
/*------------------------------------------------------------------------
# mod_sp_simple_map - Google Map module for Joomla by JoomShaper.com
# ------------------------------------------------------------------------
# author JoomShaper http://www.joomshaper.com
# Copyright (C) 2010 - 2012 JoomShaper.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.joomshaper.com
-------------------------------------------------------------------------*/
// no direct access
defined('_JEXEC') or die('Restricted access');
//Parameters
$uniqid = $module->id;
$gmap_api = $params->get ('gmap_api');
$lat = $params->get ('lat');
$lng = $params->get ('lng');
$height = $params->get ('height',300);
$map_type = $params->get ('map_type','ROADMAP');
$zoom = $params->get ('zoom',8);
$doc = JFactory::getDocument();
if ($gmap_api) {
$doc->addScript('https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&key='. $gmap_api .'');
} else{
$doc->addScript('https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false');
}
//$doc->addScript('https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false');//Add map api script
$doc->addStyledeclaration("#sp_simple_map_canvas {margin:0;padding:0;height:" . $height . "px}");//Add inline stlesheet
require(JModuleHelper::getLayoutPath('mod_sp_simple_map'));//Load layout