Back to PhocaGalleryRenderMap class

Method loadApi

public
loadApi
()

Method loadApi - Source code

public function loadApi()
{
    $paramsC = ComponentHelper::getParams('com_phocagallery');
    $key = $paramsC->get('maps_api_key', '');
    $ssl = $paramsC->get('maps_api_ssl', 1);
    if ($ssl) {
        $h = 'https://';
    } else {
        $h = 'http://';
    }
    if ($key) {
        $k = '&key=' . PhocaGalleryText::filterValue($key, 'text');
    } else {
        $k = '';
    }
    return '<script async defer src="' . $h . 'maps.googleapis.com/maps/api/js?callback=initMap' . $k . '" type="text/javascript"></script>';
}