/** * Data for the markers consisting of a name, a LatLng and a zIndex for * the order in which these markers should display on top of each * other. */ var companies = [ <?php $db = JFactory::getDBO(); $index = 1; foreach ($this->offers as $offer) { $description = str_replace("\r\n", "", $offer->short_description); $description = str_replace("\\'", "", $description); $description = $db->escape($description); $marker = 0; $contentString = '<div id="map-content">' . '<h1 id="firstHeading" class="firstHeading">' . $db->escape($offer->subject) . '</h1>' . '<p>' . (!empty($offer->picture_path) ? '<img src="' . JURI::root() . PICTURES_PATH . $offer->picture_path . '" alt="' . $db->escape($offer->subject) . '">' : "") . JBusinessUtil::truncate(strip_tags($description), 180, ' … ', true) . '</p>' . '<p><a href="' . $db->escape(JBusinessUtil::getOfferLink($offer->id, $offer->alias)) . '">' . JText::_("LNG_MORE_INFO", true) . '</a></p>' . '</div>'; if (!empty($offer->latitude) && !empty($offer->longitude)) { echo "['" . $db->escape($offer->subject) . "', " . $offer->latitude . "," . $offer->longitude . ", 4,'" . $contentString . "','" . $index . "','" . $marker . "']," . "\n"; } $index++; } ?> ]; function setMarkers(map, locations) { // Add markers to the map // Marker sizes are expressed as a Size of X,Y // where the origin of the image (0,0) is located // in the top left of the image.
?> " src="<?php echo JURI::root() . "/" . PICTURES_PATH . $offer->picture_path; ?> "> </a> </div> <div class="offer-subject"> <a title="<?php echo $offer->subject; ?> " href="<?php echo JBusinessUtil::getOfferLink($offer->id, $offer->alias); ?> "><?php echo $offer->subject; ?> </a> </div> </div> <?php if (($i + 1) % 4 == 0 && $i != 0) { ?> </div> <div class="row-fluid"> <?php }