[TASK] Seperate lat lng in function

This commit is contained in:
Dirk 2019-09-23 15:41:41 +02:00
parent 134611c33c
commit 3d4f9d5088

View file

@ -274,6 +274,10 @@ class DestinationDataImportService {
if($event['street'] && $event['city'] && $event['zip'] && $event['country'])
$this->setAddress($event['street'], $event['city'], $event['zip'], $event['country'], $event['geo']['main']['latitude'], $event['geo']['main']['longitude']);
// Set LatLng
if($event['geo']['main']['latitude'] && $event['geo']['main']['longitude'])
$this->setLatLng($event['geo']['main']['latitude'], $event['geo']['main']['longitude']);
// Set Categories
if($event['categories'])
$this->setCategories($event['categories']);
@ -456,14 +460,19 @@ class DestinationDataImportService {
* @param string $city
* @param string $zip
* @param string $country
* @param string $lat
* @param string $lng
*/
protected function setAddress(String $street, String $city, String $zip, String $country, String $lat, String $lng) {
protected function setAddress(String $street, String $city, String $zip, String $country) {
$this->tmpCurrentEvent->setStreet($street);
$this->tmpCurrentEvent->setCity($city);
$this->tmpCurrentEvent->setZip($zip);
$this->tmpCurrentEvent->setCountry($country);
}
/**
* @param string $lat
* @param string $lng
*/
protected function setLatLng(String $lat, String $lng) {
$this->tmpCurrentEvent->setLatitude($lat);
$this->tmpCurrentEvent->setLongitude($lng);
}