fix josm remote

This commit is contained in:
Tykayn 2025-06-06 13:50:14 +02:00 committed by tykayn
parent 8bce5fe21c
commit ef42dba9dd
2 changed files with 57 additions and 17 deletions

View file

@ -63,11 +63,14 @@ function openInJOSM(map, map_is_loaded, osmElements) {
`select=${selectParams.join(',')}`;
// Utiliser le bouton caché pour ouvrir JOSM
const josmButton = document.getElementById('josmButton');
if (!josmButton) {
console.error('Le bouton JOSM n\'existe pas dans le DOM');
return;
}
josmButton.href = josmUrl;
josmButton.click();
}
// Créer un élément <a> temporaire
const tempLink = document.createElement('a');
tempLink.style.display = 'none';
document.body.appendChild(tempLink);
tempLink.href = josmUrl;
console.log('josmUrl', josmUrl);
tempLink.click();
document.body.removeChild(tempLink);
}