Skip to content

Instantly share code, notes, and snippets.

@mjaschen
Created June 1, 2016 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjaschen/4305ab1251615660328d6d714d01e7f0 to your computer and use it in GitHub Desktop.
Save mjaschen/4305ab1251615660328d6d714d01e7f0 to your computer and use it in GitHub Desktop.
<?php
require_once __DIR__ . "/vendor/autoload.php";
use Location\Coordinate;
use Location\Distance\Vincenty;
$coordinate1 = new Coordinate(19.820664, -155.468066); // Mauna Kea Summit
$coordinate2 = new Coordinate(20.709722, -156.253333); // Haleakala Summit
$calculator = new Vincenty();
echo $calculator->getDistance($coordinate1, $coordinate2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment