<?php if (!empty($this->intro_items)) : ?>
<?php foreach ($this->intro_items as $key => &$item) : ?>
<?php
$this->item = &$item;
$fieldValue = $this->item->jcfields[18]->rawvalue;
if ($fieldValue !== '') :
$mapcoords = json_decode($fieldValue, true);
$count = 0;
foreach ($mapcoords as $valuemap) : ?>
myGeoObjects[<?php echo $count; ?>] = new ymaps.GeoObject({
geometry: {
type: "Point",
coordinates: [<?php echo $valuemap[coordszavod]; ?>]
},
properties: {
balloonContentBody: '<a href="<?php echo $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));?>"><?php echo $valuemap[namezavod]; ?></a>'
}
});
<?php $count++; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>