<?php
/*------------------------------------------------------------------------
# com_zhosmmap - Zh OpenStreetMap
# ------------------------------------------------------------------------
# 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');

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;

$document    = Factory::getDocument();

// ***** Init Section Begin ***********************************
        $this->MapXsuffix = "ZhOMCOM";

        $this->markercluster = 0;
        $this->markerclusterlist = 0;
        $this->markermanager = 0;
        $this->main_lang = "";
        $this->infobubble = 0;
        $this->featureMarkerWithLabel = 0;
        $this->use_object_manager = 0;

        $this->current_custom_js_path = URI::root() .'components/com_zhosmmap/assets/js/';    
        $current_custom_js_path = $this->current_custom_js_path;

        
        $this->useObjectStructure = 1;
        $useObjectStructure = $this->useObjectStructure;
        
        
// ***** Init Section End *************************************


// ***** Settings Begin *************************************

$map = $this->item;
$markers = $this->markers;
$paths = $this->paths;
$routers = $this->routers;
$maptypes = $this->maptypes;

$mgrgrouplist = $this->mgrgrouplist;
$markergroups = $this->markergroups;


$centerplacemarkid = $this->centerplacemarkid;
$centerplacemarkactionid = $this->centerplacemarkid;
$centerplacemarkaction = $this->centerplacemarkaction;
$externalmarkerlink = (int)$this->externalmarkerlink;

$placemarklistid = $this->placemarklistid;
$explacemarklistid = $this->explacemarklistid;
$grouplistid = $this->grouplistid;
$categorylistid = $this->categorylistid;
//
// Pass it but not use there (only in query)
$routelistid = $this->routelistid;
$exroutelistid = $this->exroutelistid;
$routegrouplistid = "";
$routecategorylistid = $this->routecategorylistid;

// Pass, used in query
$pathlistid = $this->pathlistid;
$expathlistid = $this->expathlistid;
$pathgrouplistid = $this->pathgrouplistid;
$pathcategorylistid = $this->pathcategorylistid;
//

$taglistid = $this->taglistid;
$pathtaglistid = $this->pathtaglistid;


$mapzoom = $this->mapzoom;

// addition parameters
if ($this->usermarkersfilter == "")
{
    $usermarkersfilter = (int)$map->usermarkersfilter;
}
else
{
    $usermarkersfilter = (int)$this->usermarkersfilter;
}

$mapMapWidth = $this->mapwidth;
$mapMapHeight = $this->mapheight;


// -- -- extending ------------------------------------------
// class suffix, for example for module use
$cssClassSuffix = "";


// -- -- -- component options - begin -----------------------
$compatiblemode = $this->mapcompatiblemode;

$licenseinfo = $this->licenseinfo;

$loadtype = $this->loadtype;
$apiversion = $this->mapapiversion;


$main_lang = $this->main_lang;

$this->urlProtocol = "http";
if ($this->httpsprotocol != "")
{
    if ((int)$this->httpsprotocol == 0)
    {
        $this->urlProtocol = 'https';
    }
}    

$load_delay = $this->load_delay;

$urlProtocol = $this->urlProtocol;

$placemarkTitleTag = $this->placemarktitletag;

// Fix Global Scope Variable names
$this->apiversion = $apiversion;

// -- -- -- component options - end -------------------------

// ***** Settings End ***************************************



require_once (JPATH_SITE . '/components/com_zhosmmap/tmpl/map/display_map_data.php');


// add local variables for common script
//   because module doesn't use object model

$main_lang = $this->main_lang;
$featureMarkerWithLabel = $this->featureMarkerWithLabel;
$markercluster = $this->markercluster;
$markerclusterlist = $this->markerclusterlist;
$markermanager = $this->markermanager;

$infobubble = $this->infobubble;
$use_object_manager = $this->use_object_manager;

$useObjectStructure = $this->useObjectStructure;

$current_custom_js_path = $this->current_custom_js_path;    


require_once (JPATH_SITE . '/components/com_zhosmmap/tmpl/map/display_script.php');

