diff --git a/ground/classes/Coord.php b/ground/classes/Coord.php index 7e1f32c..e267470 100644 --- a/ground/classes/Coord.php +++ b/ground/classes/Coord.php @@ -4,12 +4,11 @@ class Coord { static function dergeeToMinute($input) { - if ($input < 0) - $input *= -1; + $input = abs($input); $degree = floor($input); $minute = 60 * ($input - $degree); - return $degree.'°'.$minute.'\''; + return $degree.'°'.substr($minute,0,6).'\''; } } diff --git a/ground/views/point.php b/ground/views/point.php index 4249501..c31b68e 100644 --- a/ground/views/point.php +++ b/ground/views/point.php @@ -5,8 +5,8 @@
Координаты:  - lat > 0 ? 'N' : 'S' ?>lat > 0 ? $point->lat : (-1 * $point->lat) ?>° - lng > 0 ? 'E' : 'W' ?>lng > 0 ? $point->lng : (-1 * $point->lng) ?>° + lat > 0 ? 'N' : 'S' ?>lat),5,'.','') ?>° + lng > 0 ? 'E' : 'W' ?>lng),5,'.','') ?>°   /