primo commit
This commit is contained in:
		| @ -0,0 +1 @@ | ||||
| <html><body bgcolor="#FFFFFF"></body></html> | ||||
| @ -0,0 +1,59 @@ | ||||
| <?php | ||||
| /* | ||||
|  * @package Joomla | ||||
|  * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved. | ||||
|  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php | ||||
|  * | ||||
|  * @component Phoca Gallery | ||||
|  * @copyright Copyright (C) Jan Pavelka www.phoca.cz | ||||
|  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | ||||
|  */ | ||||
| defined('_JEXEC') or die('Restricted access'); | ||||
| use Joomla\CMS\Language\Text; | ||||
| use Joomla\CMS\Factory; | ||||
| phocagalleryimport('phocagallery.render.rendermap'); | ||||
|  | ||||
|  | ||||
| $map	= new PhocaGalleryRenderMap(); | ||||
| echo $map->loadApi(); | ||||
| echo '<noscript>'.Text::_('COM_PHOCAGALLERY_GOOGLE_MAPS_ENABLE_JS').'</noscript>'; | ||||
| echo '<div align="center" style="margin:0;padding:0;text-align: center;">'; | ||||
| echo '<div id="phocaMap" style="margin:0 auto;padding:0;width:520px;height:460px;"></div></div>'; | ||||
|  | ||||
| $document					= Factory::getDocument(); | ||||
| $document->addCustomTag( "<style type=\"text/css\"> \n"  | ||||
| 			. '#phocaMap img { | ||||
| 					max-width: none; | ||||
| 				}' | ||||
| 			." </style> \n"); | ||||
|  | ||||
|  | ||||
| //echo $map->loadApi(); | ||||
| ?><script type='text/javascript'>//<![CDATA[ | ||||
| <?php  | ||||
|  | ||||
| echo $map->createMap('phocaMap', 'mapPhocaMap', 'phocaLatLng', 'phocaOptions','tstPhocaMap', 'tstIntPhocaMap'); | ||||
| echo $map->cancelEventF(); | ||||
| echo $map->checkMapF(); | ||||
|  | ||||
|  | ||||
| echo $map->startMapF(); | ||||
| 	echo $map->setLatLng( $this->latitude, $this->longitude ); | ||||
| 	echo $map->startOptions(); | ||||
| 	echo $map->setZoomOpt($this->zoom).','."\n"; | ||||
| 	echo $map->setCenterOpt().','."\n"; | ||||
| 	echo $map->setTypeControlOpt().','."\n"; | ||||
| 	echo $map->setNavigationControlOpt().','."\n"; | ||||
| 	echo $map->setScaleControlOpt(1).','."\n"; | ||||
| 	echo $map->setScrollWheelOpt(1).','."\n"; | ||||
| 	echo $map->setDisableDoubleClickZoomOpt(0).','."\n"; | ||||
| 	echo $map->setMapTypeOpt()."\n"; | ||||
| 	echo $map->endOptions(); | ||||
| 	echo $map->setMap(); | ||||
| 	echo $map->exportZoom($this->zoom, '', 'phocaSelectMap_jform_zoom'); | ||||
| 	echo $map->exportMarker(1, $this->latitude, $this->longitude, '', '', 'phocaSelectMap_jform_latitude', 'phocaSelectMap_jform_longitude'); | ||||
| 	echo $map->setListener(); | ||||
| echo $map->endMapF(); | ||||
| echo $map->setInitializeF(); | ||||
| ?>//]]></script> | ||||
| <?php echo $map->loadApi(); ?> | ||||
| @ -0,0 +1,45 @@ | ||||
| <?php | ||||
| /* @package Joomla | ||||
|  * @copyright Copyright (C) Open Source Matters. All rights reserved. | ||||
|  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php | ||||
|  * @extension Phoca Extension | ||||
|  * @copyright Copyright (C) Jan Pavelka www.phoca.cz | ||||
|  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | ||||
|  */ | ||||
| defined('_JEXEC') or die('Restricted access'); | ||||
|  | ||||
| $id		= uniqid(); | ||||
| $map	= new PhocaGalleryRenderMaposm($id); | ||||
| $map->loadAPI(); | ||||
| if ($this->type == 'marker') { | ||||
| 	$map->loadCoordinatesJS(); | ||||
| } | ||||
|  | ||||
|  | ||||
| $map->createMap($this->latitude, $this->longitude, $this->zoom); | ||||
| $map->setMapType(); | ||||
| $map->setMarker($id, '', '', $this->latitude, $this->longitude); | ||||
|  | ||||
| // Export, Move, Input, renderSearch are dependent | ||||
| $map->moveMarker(); | ||||
| if ($this->type == 'marker') { | ||||
| 	$map->inputMarker('jform_latitude_id', 'jform_longitude_id', '', 1); | ||||
| } else { | ||||
| 	$map->inputMarker('jform_latitude_id', 'jform_longitude_id', 'jform_zoom_id', 0); | ||||
| } | ||||
| $map->exportMarker($id); | ||||
| $map->renderSearch($id); | ||||
|  | ||||
| $map->renderFullScreenControl(); | ||||
| $map->renderCurrentPosition(); | ||||
|  | ||||
| $map->renderMap(); | ||||
|  | ||||
| echo '<div id="phocamaps" style="margin:0;padding:0;">'; | ||||
| echo '<div align="center" style="margin:0;padding:0">'; | ||||
| echo '<div id="phocaGalleryMap'.$id.'" style="margin:0;padding:0;width:100%;height:97vh"></div></div>'; | ||||
|  | ||||
|  | ||||
|  | ||||
| echo '</div>'; | ||||
| ?> | ||||
| @ -0,0 +1 @@ | ||||
| <html><body bgcolor="#FFFFFF"></body></html> | ||||
| @ -0,0 +1,58 @@ | ||||
| <?php | ||||
| /* | ||||
|  * @package		Joomla.Framework | ||||
|  * @copyright	Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license		GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  * | ||||
|  * @component Phoca Component | ||||
|  * @copyright Copyright (C) Jan Pavelka www.phoca.cz | ||||
|  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License version 2 or later; | ||||
|  */ | ||||
| defined('_JEXEC') or die(); | ||||
| use Joomla\CMS\MVC\View\HtmlView; | ||||
| use Joomla\CMS\Factory; | ||||
| use Joomla\CMS\Component\ComponentHelper; | ||||
| jimport( 'joomla.application.component.view'); | ||||
| phocagalleryimport('phocagallery.render.rendermaposm'); | ||||
|  | ||||
| class PhocaGalleryCpViewPhocagalleryG extends HtmlView | ||||
| { | ||||
| 	protected $latitude; | ||||
| 	protected $longitude; | ||||
| 	protected $zoom; | ||||
| 	protected $map_type; | ||||
| 	protected $type; | ||||
| 	protected $r; | ||||
| 	protected $t; | ||||
|  | ||||
| 	public function display($tpl = null) { | ||||
|  | ||||
| 		$app = Factory::getApplication(); | ||||
|  | ||||
| 		$this->t	= PhocaGalleryUtils::setVars('g'); | ||||
| 		$this->r	= new PhocaGalleryRenderAdminview(); | ||||
|  | ||||
| 		$params	 			= ComponentHelper::getParams( 'com_phocagallery' ); | ||||
| 		$this->latitude		= $app->input->get( 'lat', '50.079623358200884', 'get', 'string' ); | ||||
| 		$this->longitude	= $app->input->get( 'lng', '14.429919719696045', 'get', 'string' ); | ||||
| 		$this->zoom			= $app->input->get( 'zoom', '2', 'get', 'string' ); | ||||
| 		$this->map_type		= $params->get( 'map_type', 2 ); | ||||
|  | ||||
| 		$this->type 		= 'map'; | ||||
|  | ||||
| 		$document	= Factory::getDocument(); | ||||
| 		$document->addCustomTag( "<style type=\"text/css\"> \n" | ||||
| 			." html,body, .contentpane{overflow:hidden;background:#ffffff;} \n" | ||||
| 			." </style> \n"); | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| 		if ($this->map_type == 2) { | ||||
| 			parent::display('osm'); | ||||
| 		} else { | ||||
| 			parent::display($tpl); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| ?> | ||||
		Reference in New Issue
	
	Block a user