Example #1
0
 echo $map->startMapFunction();
 echo $map->setLatLng($this->map->latitude, $this->map->longitude);
 echo $map->startMapOptions();
 echo $map->setMapOption('zoom', $this->map->zoom) . ',' . "\n";
 echo $map->setCenterOpt() . ',' . "\n";
 echo $map->setTypeControlOpt($this->map->typecontrol, $this->map->typecontrolposition) . ',' . "\n";
 echo $map->setNavigationControlOpt($this->map->zoomcontrol) . ',' . "\n";
 echo $map->setMapOption('scaleControl', $this->map->scalecontrol, TRUE) . ',' . "\n";
 echo $map->setMapOption('scrollwheel', $this->map->scrollwheelzoom) . ',' . "\n";
 echo $map->setMapOption('disableDoubleClickZoom', $this->map->disabledoubleclickzoom) . ',' . "\n";
 //	echo $map->setMapOption('googleBar', $this->map->googlebar).','."\n";// Not ready yet
 //	echo $map->setMapOption('continuousZoom', $this->map->continuouszoom).','."\n";// Not ready yet
 echo $map->setMapTypeOpt($this->map->typeid) . "\n";
 echo $map->endMapOptions();
 if ($this->t['close_opened_window'] == 1) {
     echo $map->setCloseOpenedWindow();
 }
 echo $map->setMap();
 // Markers
 jimport('joomla.filter.output');
 if (isset($this->marker) && !empty($this->marker)) {
     $iconArray = array();
     // add information about created icons to array and check it so no duplicity icons js code will be created
     foreach ($this->marker as $key => $markerV) {
         if (isset($markerV->longitude) && $markerV->longitude != '' && (isset($markerV->latitude) && $markerV->latitude != '')) {
             $hStyle = 'font-size:120%;margin: 5px 0px;font-weight:bold;';
             $text = '<div style="' . $hStyle . '">' . addslashes($markerV->title) . '</div>';
             // Try to correct images in description
             $markerV->description = PhocaMapsHelper::fixImagePath($markerV->description);
             $markerV->description = str_replace('@', '&#64;', $markerV->description);
             $text .= '<div>' . PhocaMapsHelper::strTrimAll(addslashes($markerV->description)) . '</div>';