Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
3285a19e
Commit
3285a19e
authored
Dec 14, 2021
by
Julien Jorry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix geoloc lat lon
parent
8e7ca4e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ImportController.php
src/Controller/ImportController.php
+2
-2
GeolocListener.php
src/EventListener/GeolocListener.php
+2
-2
No files found.
src/Controller/ImportController.php
View file @
3285a19e
...
...
@@ -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
);
}
...
...
src/EventListener/GeolocListener.php
View file @
3285a19e
...
...
@@ -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
())
));
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment