public function GmapPolylineToolbox::getDist in GMap Module 7.2
Distance in two dimensions.
√((x1-x0)^2 + (y1-y0)^2) former gmap_polyutil_dist($p1, $p2)
File
- lib/
Drupal/ gmap/ GmapPolylineToolbox.php, line 167 - Contains GmapPolylineToolbox.php Encoded polyline utilities.
Class
Namespace
Drupal\gmapCode
public function getDist() {
$this->distance = sqrt(pow($this->endPoint[0] - $this->startPoint[0], 2) + pow($this->endPoint[1] - $this->startPoint[1], 2));
return $this->distance;
}