MAPG-111 query map area from DB

modify calculations to be in square km (instead of m)
This commit is contained in:
bence committed 2020-06-12 21:55:04 +02:00
1 parent 4d7c86fd1b
commit 7159867db0
6 files changed
+27 -28

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ class MapRepository
public function getById(int $mapId)
{
$select = new Select(\Container::$dbConnection, 'maps');
$select->columns(['id', 'name', 'description', 'bound_south_lat', 'bound_west_lng', 'bound_north_lat', 'bound_east_lng']);
$select->columns(['id', 'name', 'description', 'bound_south_lat', 'bound_west_lng', 'bound_north_lat', 'bound_east_lng', 'area']);
$select->whereId($mapId);
return $select->execute()->fetch(IResultSet::FETCH_ASSOC);