PHP Класс Treffynnon\Navigator\Distance

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$point1 N\LatLong The first coordinate
$point2 N\LatLong The second coordinate

Открытые методы

Метод Описание
__construct ( Treffynnon\Navigator\LatLong $point1, Treffynnon\Navigator\LatLong $point2 ) Instantiate the distance object and supply the two coordinates to calculate the distance between them
get ( Treffynnon\Navigator\Distance\Calculator\CalculatorInterface $calculator = null, Treffynnon\Navigator\Distance\Converter\ConverterInterface $unit_converter = null ) : float Calculate the distance between two points. Defaults to Vincenty if no calculator is supplied. If no unit converter is supplied then the formula will return a value in metres.

Описание методов

__construct() публичный Метод

Instantiate the distance object and supply the two coordinates to calculate the distance between them
public __construct ( Treffynnon\Navigator\LatLong $point1, Treffynnon\Navigator\LatLong $point2 )
$point1 Treffynnon\Navigator\LatLong
$point2 Treffynnon\Navigator\LatLong

get() публичный Метод

Calculate the distance between two points. Defaults to Vincenty if no calculator is supplied. If no unit converter is supplied then the formula will return a value in metres.
public get ( Treffynnon\Navigator\Distance\Calculator\CalculatorInterface $calculator = null, Treffynnon\Navigator\Distance\Converter\ConverterInterface $unit_converter = null ) : float
$calculator Treffynnon\Navigator\Distance\Calculator\CalculatorInterface
$unit_converter Treffynnon\Navigator\Distance\Converter\ConverterInterface
Результат float

Описание свойств

$point1 защищенное свойство

The first coordinate
protected N\LatLong $point1
Результат N\LatLong

$point2 защищенное свойство

The second coordinate
protected N\LatLong $point2
Результат N\LatLong