PHP 클래스 Treffynnon\Navigator\Distance

파일 보기 프로젝트 열기: treffynnon/navigator 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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