| @@ 248-255 (lines=8) @@ | ||
| 245 | return $response; |
|
| 246 | } |
|
| 247 | ||
| 248 | public static function validateLatitude($lat) |
|
| 249 | { |
|
| 250 | if (!is_numeric($lat)) { |
|
| 251 | return false; |
|
| 252 | } |
|
| 253 | ||
| 254 | if ($lat>90 || $lat<-90) { |
|
| 255 | return false; |
|
| 256 | } |
|
| 257 | ||
| 258 | return true; |
|
| @@ 261-268 (lines=8) @@ | ||
| 258 | return true; |
|
| 259 | } |
|
| 260 | ||
| 261 | public static function validateLongitude($lng) |
|
| 262 | { |
|
| 263 | if (!is_numeric($lng)) { |
|
| 264 | return false; |
|
| 265 | } |
|
| 266 | ||
| 267 | if ($lng>180 || $lng<-180) { |
|
| 268 | return false; |
|
| 269 | } |
|
| 270 | ||
| 271 | return true; |
|