tmpl['apikey'] == '') { echo '

' . JText::_('Google Maps API Key Error Front') . '

'; } else if ((!isset($this->map->longitude)) || (!isset($this->map->latitude)) || (isset($this->map->longitude) && $this->map->longitude == '') || (isset($this->map->latitude) && $this->map->latitude == '')) { echo '

' . JText::_('Google Maps Error Front') . '

'; } else { if (isset($this->map->description) && $this->map->description != '' && $this->pluginmap == 0) { echo '
'.$this->map->description.'
'; } // Проверка значений $fullWidth = 0; if (!isset($this->map->width)) { $this->map->width = 400; } if (isset($this->map->width) && (int)$this->map->width < 1) { $fullWidth = 1; } if (!isset($this->map->height) || (isset($this->map->height) && (int)$this->map->height < 1)) { $this->map->height = 400; } if (!isset($this->map->zoom) || (isset($this->map->zoom) && (int)$this->map->zoom < 1)) { $this->map->height = 2; } $mapLang = ''; if (!isset($this->map->lang) || (isset($this->map->lang) && $this->map->lang =='')) { $mapLang = '1.1'; } else { $mapLang = $this->map->lang; } $document = & JFactory::getDocument(); $scriptLink = 'http://api-maps.yandex.ru/'.$mapLang.'/index.xml?key='. $this->tmpl['apikey']; $document->addScript($scriptLink); if ($fullWidth == 1) {//если 0 то растягиваем на 100% echo '
'; }else{//если больше 0 то по заданным размерам echo '
'; } if (isset($this->map->displayroute) && $this->map->displayroute == 1) { if (isset($this->marker) && !empty($this->marker)) { $countMarker = count($this->marker); if ((int)$countMarker > 1) { echo '
'; echo JText::_('From Address').': '; echo ' ' . JText::_('To').': '; echo '
'; echo '
'; echo '

'; echo '
'; } else if ((int)$countMarker == 1) { echo '

'; echo '
'; //echo '
'; } } } //стартуем загрузку карты $scriptheader = '' ."\n"; echo $scriptheader; } if ($this->tmpl['displayyandexinfo'] == 1) { echo ''; } echo '
Яндекс карты
'; ?>