ivanciric/laracoord

Laravel 5 package for geolocation distance calculations
200
Install
composer require ivanciric/laracoord
License:MIT
Last Updated:Dec 20, 2016
Links: GitHub  ·  Packagist
Maintainer: ivanciric

Laracoord

Calculate distance between two points on a globe.

getDistance() method:

No dependencies, just pass sets of coordinates to calculate distance between places.

Installation:

Add

"ivanciric/laracoord": "dev-master" 

to composer "require" array.

Run "composer update".

You can now use the class:

$g = Laracoord::getDistance(
            [
                'lon' => 25.3892,
                'lat' => 35.3172
            ],
            [
                'lon' => 28.3892,
                'lat' => 37.3172
            ],
            'km'
        );

dd($g);

[Screenshot]

Related links:

http://mathworld.wolfram.com/Haversine.html

http://www.codecodex.com/wiki/Calculate_distance_between_two_points_on_a_globe#PHP

Related Packages

mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

20,521,791 1,979
kyslik/column-sortable

Package for handling column sorting in Laravel 6.x

6,201,869 647
mews/captcha

Laravel 5/6/7/8/9/10/11/12 Captcha Package

6,065,448 2,586
ajthinking/archetype

Programmatically edit PHP and Laravel files.

4,249,684 272