@@ 106-108 (lines=3) @@ | ||
103 | ||
104 | if (preg_match($regexp, $string, $match) === 1) { |
|
105 | $latitude = (int)$match[2] + (float)$match[3] / 60; |
|
106 | if (strtoupper(trim($match[1])) === 'S' || strtoupper(trim($match[4])) === 'S') { |
|
107 | $latitude = - $latitude; |
|
108 | } |
|
109 | $longitude = (int)$match[6] + (float)$match[7] / 60; |
|
110 | if (strtoupper(trim($match[5])) === 'W' || strtoupper(trim($match[8])) === 'W') { |
|
111 | $longitude = - $longitude; |
|
@@ 153-155 (lines=3) @@ | ||
150 | ||
151 | if (preg_match($regexp, $string, $match) === 1) { |
|
152 | $latitude = $match[2]; |
|
153 | if (strtoupper(trim($match[1])) === 'S' || strtoupper(trim($match[3])) === 'S') { |
|
154 | $latitude = - $latitude; |
|
155 | } |
|
156 | $longitude = $match[5]; |
|
157 | if (strtoupper(trim($match[4])) === 'W' || strtoupper(trim($match[6])) === 'W') { |
|
158 | $longitude = - $longitude; |