Commit 3285a19e by Julien Jorry

Fix geoloc lat lon

parent 8e7ca4e1
......@@ -303,8 +303,8 @@ class ImportController extends CRUDController
$geolocFound->setCpostal($cpostal);
$geolocFound->setVille($ville);
if (!empty($latitude) && !empty($longitude)) {
$geolocFound->setLat((float) $latitude);
$geolocFound->setLon((float) $longitude);
$geolocFound->setLat(floatval(str_replace(',', '.', $latitude)));
$geolocFound->setLon(floatval(str_replace(',', '.', $longitude)));
}
$comptoir->setGeoloc($geolocFound);
}
......
......@@ -39,8 +39,8 @@ class GeolocListener
$result = $geocoder->geocodeQuery(GeocodeQuery::create($fullAddress));
if (count($result) > 0) {
$coords = $result->first()->getCoordinates();
$entity->setLat($coords->getLatitude());
$entity->setLon($coords->getLongitude());
$entity->setLat(floatval(str_replace(',', '.', $coords->getLatitude())));
$entity->setLon(floatval(str_replace(',', '.', $coords->getLongitude())));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment