Skip to content

Instantly share code, notes, and snippets.

View gosman's full-sized avatar

Graham O'Shea gosman

View GitHub Profile
@gosman
gosman / get_center.php
Created January 16, 2016 10:55
PHP Get Center Point from an array of Longitude, Latitudes
<?php
$coords[]=array('lat' => '53.344104','lng'=>'-6.2674937');
$coords[]=array('lat' => '51.5081289','lng'=>'-0.128005');
print_r(get_center($coords));
function get_center($coords)
{