public function getByExif(Picture $picture) { $exif = $picture->getExif(); if (isset($exif['SectionsFound']) && @strpos($exif['SectionsFound'], 'GPS')) { try { $lat = $this->getGps($exif['GPSLatitude']); $lng = $this->getGps($exif['GPSLongitude']); if ($lat && $lng) { $this->getByLatLng($lat, $lng); return true; } } catch (\Exception $e) { return false; } } return false; }