Location: PHPKode > projects > injooosm > components/com_injooosm/views/injooosm/view.html.php
<?php
/**
 * Joomla! 1.5 component injooosm
 *
 * @version $Id: view.html.php 2010-02-05 21:24:00$
 * @author Christian Knorr
 * @package injooosm
 * @subpackage frontend
 * @license GNU/GPL
 * @filesource
 *
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

jimport( 'joomla.application.component.view');


/**
 * HTML View class for the injooosm component
 */
class injooosmViewinjooosm extends JView {
	function display($tpl = null) {
	$cfg = injooosmHelper::getConfig();
	$gps = new gpsClass();
	$document =& JFactory::getDocument();
// Kartenauswahl BEGIN
	if ( $cfg->map == "google" ) {
		$document->addScript('http://www.google.com/jsapi?key='.$cfg->apikey);
		$document->addScript('http://www.google.com/uds/api?file=uds.js&v=1.0&key='.$cfg->apikey);
// 		$document->addScript('http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css');
	}
	if ( $cfg->map == "osm" ) {
//		$document->addScript('components'.DS.'com_injooosm'.DS.'assets'.DS.'js'.DS.'OpenLayers'.DS.'OpenLayers.js'); // Benötigt für Spuransich in Übersicht
		$document->addScript('http://www.openlayers.org/api/OpenLayers.js');
//		$document->addScript('http://www.openstreetmap.org/openlayers/OpenLayers.js'); // tuts nicht
		$document->addScript('http://www.openstreetmap.org/openlayers/OpenStreetMap.js');
//		$document->addScript('http://www.openlayers.org/api/Ajax.js');
// 		$document->addScript('components/com_injooosm/assets/js/GPX.js');
		$document->addScript('components'.DS.'com_injooosm'.DS.'assets'.DS.'js'.DS.'injooosm.js'); // Benötigt für Spuransich in Übersicht
// 		$document->addScript('');
	}
// Kartenauswahl END
	$lh = layoutHelper::navigation();
	$footer = layoutHelper::footer();
	$disclaimericons = layoutHelper::disclaimericons();
	$model = $this->getModel();
	$rows = $model->getTracksData(NULL,NULL);
	$limit = "LIMIT 0," . $cfg->sort;
	$newest = $model->getTracksData("ORDER BY a.id DESC", $limit);
	$hits = $model->getTracksData("ORDER BY a.hits DESC", $limit);
	$cats = $model->getCatsData();

	$this->assignRef('map',			$cfg->map);	// Zusatz für Kartenauswahl
	$this->assignRef('lh',			$lh);
	$this->assignRef('footer',		$footer);
	$this->assignRef('disclaimericons',	$disclaimericons);
	$this->assignRef('gps',			$gps);
	$this->assignRef('rows',		$rows);
//	$this->assignRef('karte',		$karte);
	$this->assignRef('cats',		$cats);
	$this->assignRef('newest',		$newest);
	$this->assignRef('cfg',			$cfg);
	$this->assignRef('hits',		$hits);
	$this->assignRef('visible',		$visible);

	parent::display($tpl);
	}
}
Return current item: injooosm