distance/calculator

it a simple package that allow you to get the exact distance between two geo coordinates.

dev-master 2020-03-29 19:54 UTC

This package is auto-updated.

Last update: 2024-09-29 05:29:46 UTC


README

Description

Distance-Calculator is a lightweight plugin that allow you to get the exact distance between two geo coordinates.

How to Install

composer require distance/calculator

How to integrate in laravel

Add the following line to your controller

use m2Dev\distance\Distance;

Usage

The options available :

  • k For Kilometers
  • m For Meters
  • cm For Centimeters
  • mi For Miles
  • y For Yard
  • f For Foot
  • i For Inch
  use m2Dev\distance\Distance;

  $opt = "k";
  $GPS = new Distance();
  $GPS->SetStartingFrom(36.7948624,10.0732379);
  $GPS->SetEndingAt(36.8762761,10.2538732);
  $GPS->getDistance($opt);

This is a simple and useful plugin , so many features will be added .