Skip to content

Instantly share code, notes, and snippets.

Avatar

Graham O'Shea gosman

View GitHub Profile
@gosman
gosman / get_center.php
Created Jan 16, 2016
PHP Get Center Point from an array of Longitude, Latitudes
View get_center.php
<?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)
{