프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$type | string | The type of the given coordinate. | |
$x | float | Latitude. | |
$y | float | Longitude. |
메소드 | 설명 | |
---|---|---|
createFromJson ( $json ) | ||
createFromXml ( SimpleXMLElement $xml ) : |
Factory method to create an instance of Coordinate and extract the data from the given xml. | |
floatToInt ( $float ) | ||
getDistanceTo ( $lat, $lon ) : float | Calculates the distance to another coordinate using the Haversine Formula. | |
intToFloat ( $int ) | ||
setHAFAScoordinates ( $coordinate, $x, $y ) |
public static createFromXml ( SimpleXMLElement $xml ) : |
||
$xml | SimpleXMLElement | The item xml |
리턴 | The created instance |