public function setMarkerIcon($icon)
{
$output['icon'] = 0;
$output['js'] = '';
switch ($icon) {
case 1:
$imagePath = Uri::base(true) . '/media/com_phocagallery/images/mapicons/yellow/';
$js = 'var phocaImage = new google.maps.MarkerImage(\'' . $imagePath . 'image.png\',' . "\n";
$js .= 'new google.maps.Size(26,30),' . "\n";
$js .= 'new google.maps.Point(0,0),' . "\n";
$js .= 'new google.maps.Point(0,30));' . "\n";
$js .= 'var phocaImageShadow = new google.maps.MarkerImage(\'' . $imagePath . 'shadow.png\',' . "\n";
$js .= 'new google.maps.Size(41,30),' . "\n";
$js .= 'new google.maps.Point(0,0),' . "\n";
$js .= 'new google.maps.Point(0,30));' . "\n";
$js .= 'var phocaImageShape = {' . "\n";
$js .= 'coord: [18,1,19,2,21,3,23,4,24,5,24,6,24,7,24,8,23,9,23,10,22,11,22,12,21,13,20,14,20,15,19,16,19,17,18,18,17,19,18,20,20,21,22,22,22,23,22,24,22,25,18,26,15,27,12,28,8,29,4,29,4,28,3,27,3,26,3,25,3,24,3,23,2,22,2,21,2,20,2,19,2,18,1,17,1,16,1,15,1,14,1,13,1,12,1,11,9,10,10,9,10,8,11,7,11,6,12,5,12,4,13,3,14,2,14,1],' . "\n";
$js .= 'type: \'poly\'' . "\n";
$js .= ' };' . "\n";
$output['icon'] = 1;
$output['js'] = $js;
break;
default:
$output['icon'] = 0;
$output['js'] = '';
// if Default Icon should be displayed, no Icon should be created
break;
}
return $output;
}