From 12b56e876313f7000cfe3d345fb685d0e6f54230 Mon Sep 17 00:00:00 2001 From: vincent Date: Tue, 10 Dec 2024 21:39:54 +0100 Subject: [PATCH] Ajout du lien pifomap --- assets/controllers/map_controller.js | 5 +++++ templates/macro.html.twig | 1 + 2 files changed, 6 insertions(+) diff --git a/assets/controllers/map_controller.js b/assets/controllers/map_controller.js index ba12148..8e73086 100644 --- a/assets/controllers/map_controller.js +++ b/assets/controllers/map_controller.js @@ -178,6 +178,11 @@ export default class extends Controller { window.open(url, '_blank'); } + openInPifomap() { + const url = "https://bano.openstreetmap.fr/pifometre/pifomap.html?ratio=N#map="+this.mapInstance.getZoom()+"/"+this.mapInstance.getCenter().lat+"/"+this.mapInstance.getCenter().lng; + window.open(url, '_blank'); + } + openInGeohack() { const url = "https://geohack.toolforge.org/geohack.php?params="+this.mapInstance.getCenter().lat+"_N_"+this.mapInstance.getCenter().lng+"_E"; window.open(url, '_blank'); diff --git a/templates/macro.html.twig b/templates/macro.html.twig index abd6969..bda15ca 100644 --- a/templates/macro.html.twig +++ b/templates/macro.html.twig @@ -56,6 +56,7 @@ Où : Voir sur +