You are here

function _gmap_geo_simplify_dist in GMap Addons 7

Same name and namespace in other branches
  1. 6 gmap_geo/simplify.inc \_gmap_geo_simplify_dist()

Distance between two points.

Parameters

$p0, @param $p1: A point, as array(x, y)

1 call to _gmap_geo_simplify_dist()
gmap_geo_simplify in gmap_geo/simplify.inc
This function would probably work for lines as well as polygons, but you still have to feed it a centroid.

File

gmap_geo/simplify.inc, line 171

Code

function _gmap_geo_simplify_dist($p0, $p1) {
  $dx = $p1[0] - $p0[0];
  $dy = $p1[1] - $p0[1];
  return sqrt($dx * $dx + $dy * $dy);
}