Skip to content

Instantly share code, notes, and snippets.

@aikar
Created July 27, 2010 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aikar/492757 to your computer and use it in GitHub Desktop.
Save aikar/492757 to your computer and use it in GitHub Desktop.
<?php
$distance = distance($src['lat'], $src['lng'], $dest['lat'], $dest['lng']);
$angle = getangle($src['lat'], $src['lng'], $dest['lat'], $dest['lng']);
$headdist = max($diststance * .95, $distance - .01);
$head = circle::getLatLngByAngle($src, $angle, $distance + $radius);
$srcleft = circle::getLatLngByAngle($src, $angle - 90, $radius);
$srcright = circle::getLatLngByAngle($src, $angle + 90, $radius);
$headleft = circle::getLatLngByAngle($srcleft, $angle, $headdist);
$headright = circle::getLatLngByAngle($srcright, $angle, $headdist);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment