PHP Class Location\Formatter\Coordinate\DMS

Author: Marcus Jaschen ([email protected])
Inheritance: implements Location\Formatter\Coordinate\FormatterInterface
显示文件 Open project: mjaschen/phpgeo Class Usage Examples

Protected Properties

Property Type Description
$separator Separator string between latitude and longitude
$unitType string
$units
$useCardinalLetters boolean Use cardinal letters for N/S and W/E instead of minus sign

Public Methods

Method Description
__construct ( string $separator = " " )
format ( Coordinate $coordinate ) : string
setSeparator ( $separator ) Sets the separator between latitude and longitude values
setUnits ( string $type )
useCardinalLetters ( boolean $value )

Protected Methods

Method Description
getLatPrefix ( $lat ) : string
getLatSuffix ( $lat ) : string
getLngPrefix ( $lng ) : string
getLngSuffix ( $lng ) : string

Method Details

__construct() public method

public __construct ( string $separator = " " )
$separator string

format() public method

public format ( Coordinate $coordinate ) : string
$coordinate Location\Coordinate
return string

getLatPrefix() protected method

protected getLatPrefix ( $lat ) : string
$lat
return string

getLatSuffix() protected method

protected getLatSuffix ( $lat ) : string
$lat
return string

getLngPrefix() protected method

protected getLngPrefix ( $lng ) : string
$lng
return string

getLngSuffix() protected method

protected getLngSuffix ( $lng ) : string
$lng
return string

setSeparator() public method

Sets the separator between latitude and longitude values
public setSeparator ( $separator )
$separator

setUnits() public method

public setUnits ( string $type )
$type string

useCardinalLetters() public method

public useCardinalLetters ( boolean $value )
$value boolean

Property Details

$separator protected_oe property

Separator string between latitude and longitude
protected $separator

$unitType protected_oe property

protected string $unitType
return string

$units protected_oe property

protected $units

$useCardinalLetters protected_oe property

Use cardinal letters for N/S and W/E instead of minus sign
protected bool $useCardinalLetters
return boolean