Back to PhocaGalleryRenderMaposm class

Method loadAPI

public
loadAPI
()

Method loadAPI - Source code

function loadAPI()
{
    $document = Factory::getDocument();
    $document->addScript(Uri::root(true) . '/media/com_phocagallery/js/leaflet/leaflet.js');
    $document->addStyleSheet(Uri::root(true) . '/media/com_phocagallery/js/leaflet/leaflet.css');
    $document->addScript(Uri::root(true) . '/media/com_phocagallery/js/leaflet-awesome/leaflet.awesome-markers.js');
    $document->addStyleSheet(Uri::root(true) . '/media/com_phocagallery/js/leaflet-awesome/leaflet.awesome-markers.css');
    $document->addScript(Uri::root(true) . '/media/com_phocagallery/js/leaflet-fullscreen/Leaflet.fullscreen.js');
    $document->addStyleSheet(Uri::root(true) . '/media/com_phocagallery/js/leaflet-fullscreen/leaflet.fullscreen.css');
    $document->addScript(Uri::root(true) . '/media/com_phocagallery/js/leaflet-control-locate/L.Control.Locate.min.js');
    $document->addStyleSheet(Uri::root(true) . '/media/com_phocagallery/js/leaflet-control-locate/L.Control.Locate.css');
    $document->addStyleSheet(Uri::root(true) . '/media/com_phocagallery/js/leaflet-control-locate/font-awesome.min.css');
    $document->addScript(Uri::root(true) . '/media/com_phocagallery/js/leaflet-omnivore/leaflet-omnivore.js');
    $document->addScript(Uri::root(true) . '/media/com_phocagallery/js/leaflet-search/leaflet-search.min.js');
    $document->addStyleSheet(Uri::root(true) . '/media/com_phocagallery/js/leaflet-search/leaflet-search.css');
    if ($this->router == 1) {
        $document->addScript(Uri::root(true) . '/media/com_phocagallery/js/leaflet-routing-machine/leaflet-routing-machine.min.js');
        $document->addStyleSheet(Uri::root(true) . '/media/com_phocagallery/js/leaflet-routing-machine/leaflet-routing-machine.css');
        $document->addStyleSheet(Uri::root(true) . '/media/com_phocagallery/js/leaflet-geocoder/Control.Geocoder.css');
        $document->addScript(Uri::root(true) . '/media/com_phocagallery/js/leaflet-geocoder/Control.Geocoder.js');
    }
    if ($this->easyprint == 1) {
        $document->addScript(Uri::root(true) . '/media/com_phocagallery/js/leaflet-easyprint/bundle.js');
    }
}