diversen / gps-from-exif
Get GPS from exif
Installs: 2 261
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 5
Forks: 2
Open Issues: 0
Requires
- php: >=5.3.0
README
Get GPS from exif
Install:
composer require diversen/gps-from-exif
Usage example:
include_once "vendor/autoload.php"; use \diversen\gps; // Example file // $file = "vendor/diversen/gps-from-exif/failure.jpg"; $file = "vendor/diversen/gps-from-exif/example.jpg"; $g = new gps(); // Get GPS position $gps = $g->getGpsPosition($file); if (empty($gps)) { die('Could not get GPS position' . PHP_EOL); } print_r($gps); // Get a google map echo $gmap = $g->getGmap($gps['latitude'], $gps['longitude'], 600, 350);