Collections functions
General functions
Render functions
Theme permission functions
User functions
Resource functions

leaflet_coordinate_check()

Parameters

ColumnTypeDefaultDescription
$coordinate
$type

Location

include/map_functions.php lines 496 to 515

Definition

 
function leaflet_coordinate_check($coordinate$type)
    {
    
$check false;
    if (!
is_numeric($coordinate))
        {
        return 
false;
        }

    if (
$type == 'latitude' && $coordinate >= -20037508.34 && $coordinate <= 20037508.34)
        {
        
$check true;
        }

    if (
$type == 'longitude' && $coordinate >= -20037508.34 && $coordinate <= 20037508.34)
        {
        
$check true;
        }

    return 
$check;
    }

This article was last updated 30th November 2023 18:05 Europe/London time based on the source file dated 24th January 2023 17:35 Europe/London time.