PHP code example of juliangut / gps
1. Go to this page and download the library: Download juliangut/gps library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
juliangut / gps example snippets
// Create a point with or without coordinates
$gpsPoint = new Point();
$gpsPoint = new Point('48° 0.858277778N, 2°0.2945 E'); // Eiffel tower
// Set coordinates together
$gpsPoint->set('41.9, 12.5'); // Rome
// Set separated coordinates for Empire State Building
$this->point->setLatitude('40°44′ 54.3″N');
$this->point->setLongitude('73° 59′9″ W');
echo $gpsPoint->get(Point::FORMAT_DD); // Default if none especified
echo $gpsPoint->get(Point::FORMAT_DM);
echo $gpsPoint->get(Point::FORMAT_DMS);
php composer.phar