Back to PhocaGalleryRenderMaposm class

Method inputMarker

public
inputMarker
(mixed $latInput, mixed $longInput, mixed $zoomInput = '', mixed $setGPS = 0)

Method inputMarker - Source code

public function inputMarker($latInput, $longInput, $zoomInput = '', $setGPS = 0)
{
    $o = array();
    $o[] = 'function phmInputMarker(lat, lng) {';
    $o[] = 'var phLat = jQuery(\'#jform_latitude\', window.parent.document);';
    $o[] = 'var phLng = jQuery(\'#jform_longitude\', window.parent.document);';
    $o[] = 'phLat.val(lat);';
    $o[] = 'phLng.val(lng);';
    if ($zoomInput != '') {
        $o[] = 'var phZoom = jQuery(\'#jform_zoom\', window.parent.document);';
        $o[] = 'phZoom.val(map' . $this->name . $this->id . '.getZoom());';
        $o[] = 'var phmMsg = \'<span class="ph-msg-success">' . Text::_('COM_PHOCAGALLERY_LAT_LNG_ZOOM_SET') . '</span>\';';
    } else {
        $o[] = 'var phmMsg = \'<span class="ph-msg-success">' . Text::_('COM_PHOCAGALLERY_LAT_LNG_SET') . '</span>\';';
    }
    $o[] = 'jQuery(\'#phmPopupInfo\', window.parent.document).html(phmMsg);';
    if ($setGPS == 1) {
        $o[] = '   if (window.parent) setPMGPSLatitudeForm(lat);';
        $o[] = '   if (window.parent) setPMGPSLongitudeForm(lng);';
    }
    $o[] = '}';
    $this->output[] = implode("\n", $o);
    return true;
}