Location: PHPKode > projects > injooosm > administrator/components/com_injooosm/views/default/view.html.php
<?php
/**
 * Joomla! 1.5 component injooosm
 *
 * @version $Id: view.html.php 2009-11-22 14:03:00$
 * @author Christian Knorr
 * @package injooosm
 * @subpackage backend
 * @license GNU/GPL
 * @filesource
 *
 */

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

// Import Joomla! libraries
jimport( 'joomla.application.component.view');
require_once JPATH_ROOT.DS.'components'.DS.'com_injooosm'.DS.'helpers'.DS.'gpsClass.php';
/**
 *
 */
class injooosmViewDefault extends JView {
    /**
     *
     * @param obejct $tpl
     */
    function display($tpl = null,$map=false) {

        $cfg =& injooosmHelper::getConfig();

        $gps = new gpsClass();

        $document =& JFactory::getDocument();
	if ( $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->addStylesheet('http://www.google.com/uds/css/gsearch.css');
		$document->addStylesheet('http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css');
	}
        $this->assignRef('cfg', $cfg);
        $this->assignRef('gps', $gps);
        
        parent::display($tpl);
    }
}
Return current item: injooosm