Skip to content
Snippets Groups Projects
Commit b430c37a authored by Maximilien Rozniecki's avatar Maximilien Rozniecki
Browse files

Fix a bug caused by not getting longitude and latitude correctly in the js...

Fix a bug caused by not getting longitude and latitude correctly in the js that provoqued an update of the adress not wanted
parent 1ec8ef6b
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,9 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [Non Distribué]
## [14.0.11] - 21-06-2024
- Fix a bug caused by not getting longitude and latitude correctly in the js that provoqued an update of the adress not wanted.
## [14.0.10] - 07-06-2024
- Ajout version PHP.
......@@ -75,7 +78,8 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [4.0.0] - 10-09-2018
- Version initial.
[Non Distribué]: http://git.open-dsi.fr/dolibarr-extension/prospectingmap/compare/14.0.10...HEAD
[Non Distribué]: http://git.open-dsi.fr/dolibarr-extension/prospectingmap/compare/14.0.11...HEAD
[14.0.10]: http://git.open-dsi.fr/dolibarr-extension/prospectingmap/commits/14.0.11
[14.0.10]: http://git.open-dsi.fr/dolibarr-extension/prospectingmap/commits/14.0.10
[14.0.9]: http://git.open-dsi.fr/dolibarr-extension/prospectingmap/commits/14.0.9
[14.0.8]: http://git.open-dsi.fr/dolibarr-extension/prospectingmap/commits/14.0.8
......
14.0.10
\ No newline at end of file
14.0.11
\ No newline at end of file
......@@ -547,8 +547,8 @@ HTML;
// get the latitude and longitude and try to get the location on map
// if no longitude or latitude, try with the addresse
const latitudeInput = document.querySelector('#latitude')
const longitudeInput = document.querySelector('#longitude');
const latitudeInput = document.querySelector('#map_latitude')
const longitudeInput = document.querySelector('#map_longitude');
let latitude = '';
let longitude = '';
......@@ -565,7 +565,14 @@ HTML;
if(latitude !== '' && longitude !== '')
{
set_map_location([longitude, latitude]);
if ('$coordinates_metrics' == 'EPSG:3857') {
coordinate = ol.proj.toLonLat([longitude, latitude]);
console.log('coordinate EPSG:3857:', coordinate);
} else {
coordinate = [longitude, latitude];
console.log('coordinate other than EPSG:3857:', coordinate);
}
set_map_location(coordinate);
}
else if(address_value !== '')
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment