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

leaflet_coordinate_check()

Parameters

ColumnTypeDefaultDescription
$coordinate
$type

Location

include/map_functions.php lines 480 to 499

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 20th April 2024 14:35 Europe/London time based on the source file dated 9th April 2024 11:40 Europe/London time.