distance/calculator

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

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:project

pkg:composer/distance/calculator

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

This package is auto-updated.

Last update: 2025-11-29 03:17:39 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 .