Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

leaflet_coordinate_check()

Parameters

ColumnTypeDefaultDescription
$coordinate
$type

Location

include/map_functions.php lines 492 to 511

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 21st April 2021 19:05 Europe/London time based on the source file dated 29th March 2021 15:05 Europe/London time.