* @version 0.2 */ class Coord { var $lat; var $lng; /** * Constructor for Coord class. Sets the latitude and longitude attributes. * @param float $lat The latitude in decimal degrees. * @param float $lng The longitude in decimal degrees. */ function Coord($lat, $lng) { $this->lat = $lat; $this->lng = $lng; } /** * Returns the latitude. * @return float The latitude in decimal degrees. */ function getLat() { return $this->lat; } /** * Returns the longitude. * @return float The longitude in decimal degrees. */ function getLng() { return $this->lng; } /** * Turns a coordinate into a string ie: xx.xxx, xxx.xxx * @return string The coordinate in string form. */ function toString() { return "" . $this->lat . ", " . $this->lng; } } ?>