Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

get_geolibraries()

Description

Checks the current page and includes necessary geolocation libraries for Leaflet maps.

This function loads the Leaflet Control Geocoder plugin and checks if the current page requires geolocation capabilities.
It also handles polyfills for browser compatibility, specifically for Internet Explorer and Edge.

Parameters

This function accepts no parameters.

Return

void Outputs the HTML and JavaScript for including geolocation libraries if applicable.

Location

include/map_functions.php lines 774 to 794

Definition

 
function get_geolibraries()
    {
    global 
$baseurl$pagename$map_default_cache$map_layer_cache$geo_leaflet_maps_sources,
    
$map_zoomnavbar$map_kml;
    
$map_pages = array(
        
"geo_edit",
        
"geo_search",
        
"search",
        
"view",
        
"edit",
        );
    if(!
in_array($pagename,$map_pages))
        {
        return 
false;
        }
?>

    <!--Leaflet Control Geocoder 1.10.0 plugin files-->
    <link rel="stylesheet" href=" echo $baseurl?>/lib/leaflet_plugins/leaflet-control-geocoder-1.10.0/dist/Control.Geocoder.css"/>
    <script src=" echo $baseurl?>/lib/leaflet_plugins/leaflet-control-geocoder-1.10.0/dist/Control.Geocoder.min.js"></script>
    
    
}

This article was last updated 15th December 2024 18:35 Europe/London time based on the source file dated 22nd November 2024 15:35 Europe/London time.