website: plugin api - missed removal of these lines from previous commit somehow!

This commit is contained in:
Jon Atkins
2014-06-08 07:40:37 +01:00
parent 751001c6fa
commit 7f26f8b6a8

View File

@ -68,16 +68,7 @@ class Routes {
if (!isset($run,$this->routes[$rt][$run])) { if (!isset($run,$this->routes[$rt][$run])) {
$this->routes[$rt][$run] = Array ( 'start' => format_stop($row) ); $this->routes[$rt][$run] = Array ( 'start' => format_stop($row) );
// initial bounding box from start lat/lng
$this->routes[$rt][$run]['bbox'] = Array ( 'sw'=> $this->routes[$rt][$run]['start']['location'], 'ne' => $this->routes[$rt][$run]['start']['location'] );
} }
$this->routes[$rt][$run]['end'] = format_stop($row);
//extend bounding box by end point lat/lng
$this->routes[$rt][$run]['bbox']['sw']['lat'] = min ( $this->routes[$rt][$run]['bbox']['sw']['lat'], $this->routes[$rt][$run]['end']['location']['lat'] );
$this->routes[$rt][$run]['bbox']['sw']['lng'] = min ( $this->routes[$rt][$run]['bbox']['sw']['lng'], $this->routes[$rt][$run]['end']['location']['lng'] );
$this->routes[$rt][$run]['bbox']['ne']['lat'] = max ( $this->routes[$rt][$run]['bbox']['ne']['lat'], $this->routes[$rt][$run]['end']['location']['lat'] );
$this->routes[$rt][$run]['bbox']['ne']['lng'] = max ( $this->routes[$rt][$run]['bbox']['ne']['lng'], $this->routes[$rt][$run]['end']['location']['lng'] );
} }
} }