Fixes for API and live map

This commit is contained in:
Nabeel Shahzad
2018-05-02 15:14:18 -05:00
parent 9183e0b2aa
commit 5dff563c75
18 changed files with 1971 additions and 377 deletions

View File

@@ -34,8 +34,14 @@ class GeoJson
*/
public function addPoint($lat, $lon, array $attrs)
{
$point = [$lon, $lat];
$this->line_coords[] = [$lon, $lat];
$this->point_coords[] = new Feature(new Point([$lon, $lat]), $attrs);
if(array_key_exists('alt', $attrs)) {
$point[] = $attrs['alt'];
}
$this->point_coords[] = new Feature(new Point($point), $attrs);
++$this->counter;
}