mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-06-20 01:44:42 +02:00
fix josm remote
This commit is contained in:
parent
8bce5fe21c
commit
ef42dba9dd
2 changed files with 57 additions and 17 deletions
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue