diff --git a/assets/controllers/map_controller.js b/assets/controllers/map_controller.js index 3645a50..4ca17f1 100644 --- a/assets/controllers/map_controller.js +++ b/assets/controllers/map_controller.js @@ -170,6 +170,16 @@ export default class extends Controller { 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'); + } + + openInGeoportail() { + const url = "https://www.geoportail.gouv.fr/carte?c="+this.mapInstance.getCenter().lng+","+this.mapInstance.getCenter().lat+"&z="+this.mapInstance.getZoom()+"&permalink=yes"; + window.open(url, '_blank'); + } + openInMapillary() { const url = "https://www.mapillary.com/app/?lat="+this.mapInstance.getCenter().lat+"&lng="+this.mapInstance.getCenter().lng+"&z="+this.mapInstance.getZoom(); window.open(url, '_blank'); @@ -180,4 +190,9 @@ export default class extends Controller { window.open(url, '_blank'); } + openInBing() { + const url = "https://www.bing.com/maps/?cp="+this.mapInstance.getCenter().lat+"%7E"+this.mapInstance.getCenter().lng+"&lvl="+this.mapInstance.getZoom(); + window.open(url, '_blank'); + } + } diff --git a/templates/macro.html.twig b/templates/macro.html.twig index 9645d0f..abd6969 100644 --- a/templates/macro.html.twig +++ b/templates/macro.html.twig @@ -56,8 +56,11 @@ Où : Voir sur + + +

{% endmacro %}