Your IP : 216.73.216.240
<?php
/*------------------------------------------------------------------------
# mod_zhgooglemap - Zh GoogleMap Module
# ------------------------------------------------------------------------
# author: Dmitry Zhuk
# copyright: Copyright (C) 2011 zhuk.cc. All Rights Reserved.
# license: http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
# website: http://zhuk.cc
# Technical Support Forum: http://forum.zhuk.cc/
-------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$document = JFactory::getDocument();
// ***** Init Section Begin ***********************************
$MapXsuffix = "ZhGMMOD";
$markercluster = 0;
$markermanager = 0;
$places = 0;
$weather = 0;
$loadVisualisation = 0;
$loadVisualisationKML = 0;
$main_lang = "";
$infobubble = 0;
$featureMarkerWithLabel = 0;
$use_object_manager = 0;
$map_region = "";
$load_by_script = "";
$current_custom_js_path = JURI::root() .'components/com_zhgooglemap/assets/js/';
$useObjectStructure = 0;
// ***** Init Section End *************************************
$id = $params->get('mapid', '');
$map = comZhGoogleMapData::getMap((int)$id);
// Change translation language and load translation
$currentLanguage = JFactory::getLanguage();
$currentLangTag = $currentLanguage->getTag();
if (isset($map->lang) && $map->lang != "")
{
$currentLanguage->load('com_zhgooglemap', JPATH_SITE . '/components/com_zhgooglemap', $map->lang, true);
$currentLanguage->load('mod_zhgooglemap', JPATH_SITE, $map->lang, true);
}
else
{
$currentLanguage->load('com_zhgooglemap', JPATH_SITE . '/components/com_zhgooglemap', $currentLangTag, true);
$currentLanguage->load('mod_zhgooglemap', JPATH_SITE, $currentLangTag, true);
}
if (isset($map) && (int)$map->id != 0)
{
// ***** Settings Begin *************************************
$centerplacemarkid = $params->get('centerplacemarkid', '');
$centerplacemarkaction = $params->get('centerplacemarkaction', '');
$centerplacemarkactionid = $params->get('centerplacemarkid', '');
$externalmarkerlink = (int)$params->get('externalmarkerlink', '');
$placemarklistid = $params->get('placemarklistid', '');
$explacemarklistid = $params->get('explacemarklistid', '');
$grouplistid = $params->get('grouplistid', '');
$categorylistid = $params->get('categorylistid', '');
$taglistid = $params->get('taglistid', '');
// Pass it but not use there (only in query)
$routelistid = $params->get('routelistid', '');
$exroutelistid = $params->get('exroutelistid', '');
$routegrouplistid = "";
$routecategorylistid = $params->get('routecategorylistid', '');
// Pass, used in query
$pathlistid = $params->get('pathlistid', '');
$expathlistid = $params->get('expathlistid', '');
$pathgrouplistid = $params->get('pathgrouplistid', '');
$pathcategorylistid = $params->get('pathcategorylistid', '');
$pathtaglistid = $params->get('pathtaglistid', '');
//
$usermarkersfilter = "";
// addition parameters
if ($usermarkersfilter == "")
{
$usermarkersfilter = (int)$map->usermarkersfilter;
}
else
{
$usermarkersfilter = (int)$usermarkersfilter;
}
if ($map->useajaxobject == 0)
{
$markers = comZhGoogleMapData::getMarkers($map->id, $placemarklistid, $explacemarklistid, $grouplistid, $categorylistid, $taglistid,
$map->usermarkers, $usermarkersfilter, $map->usercontact, $map->markerorder);
$paths = comZhGoogleMapData::getPaths($map->id, $pathlistid, $expathlistid, $pathgrouplistid, $pathcategorylistid, $pathtaglistid);
}
else
{
unset($markers);
unset($paths);
}
$routers = comZhGoogleMapData::getRouters($map->id, $routelistid, $exroutelistid, $routegrouplistid, $routecategorylistid);
$maptypes = comZhGoogleMapData::getMapTypes();
$markergroups = comZhGoogleMapData::getMarkerGroups($map->id, $placemarklistid, $explacemarklistid, $grouplistid, $categorylistid, $taglistid,
$map->markergrouporder);
$mgrgrouplist = comZhGoogleMapData::getMarkerGroupsManage($map->id,
$placemarklistid, $explacemarklistid, $grouplistid, $categorylistid, $taglistid,
$map->markergrouporder, $map->markergroupctlmarker, $map->markergroupctlpath,
$pathlistid, $expathlistid, $pathgrouplistid, $pathcategorylistid, $pathtaglistid);
$mapzoom = "";
$map_region = $map->region;
$map_country = $map->country;
$mapMapWidth = "";
$mapMapHeight = "";
// -- -- extending ------------------------------------------
// class suffix, for example for module use
$cssClassSuffix = $params->get('moduleclass_sfx', '');
// -- -- -- component options - begin -----------------------
$compatiblemode = comZhGoogleMapData::getCompatibleMode();
$compatiblemodersf = comZhGoogleMapData::getCompatibleModeRSF();
$licenseinfo = comZhGoogleMapData::getMapLicenseInfo();
$apikey4map = comZhGoogleMapData::getMapAPIKey();
$apikey4map_nz = comZhGoogleMapData::getNZMapAPIKey();
$loadtype = comZhGoogleMapData::getLoadType();
$apiversion = comZhGoogleMapData::getMapAPIVersion();
$apitype = comZhGoogleMapData::getMapAPIType();
$httpsprotocol = comZhGoogleMapData::getHttpsProtocol();
$urlProtocol = 'http';
if ($httpsprotocol != "")
{
if ((int)$httpsprotocol == 0)
{
$urlProtocol = 'https';
}
}
$placemarkTitleTag = comZhGoogleMapData::getPlacemarkTitleTag();
// -- -- -- component options - end -------------------------
// ***** Settings End ***************************************
require_once (JPATH_SITE . '/components/com_zhgooglemap/views/zhgooglemap/tmpl/display_map_data.php');
require_once (JPATH_SITE . '/components/com_zhgooglemap/views/zhgooglemap/tmpl/display_script.php');
}
else
{
echo JText::_( 'MOD_ZHGOOGLEMAP_MAP_NOTFIND_ID' ).' '. $id;
}