An open API service indexing awesome lists of open source software.

https://github.com/diversen/gps-from-exif

Simple php class that get Get GPS from file exif info
https://github.com/diversen/gps-from-exif

exif-gps php-gps-exif

Last synced: 12 months ago
JSON representation

Simple php class that get Get GPS from file exif info

Awesome Lists containing this project

README

          

# gps-from-exif

Get GPS from exif

Install:

composer require diversen/gps-from-exif

Usage example:

~~~.php
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);

~~~