Browse Source

Ajout du lien pifomap

master
vincent 2 weeks ago
parent
commit
12b56e8763
2 changed files with 6 additions and 0 deletions
  1. +5
    -0
      assets/controllers/map_controller.js
  2. +1
    -0
      templates/macro.html.twig

+ 5
- 0
assets/controllers/map_controller.js View File

@ -178,6 +178,11 @@ export default class extends Controller {
window.open(url, '_blank'); 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() { openInGeohack() {
const url = "https://geohack.toolforge.org/geohack.php?params="+this.mapInstance.getCenter().lat+"_N_"+this.mapInstance.getCenter().lng+"_E"; const url = "https://geohack.toolforge.org/geohack.php?params="+this.mapInstance.getCenter().lat+"_N_"+this.mapInstance.getCenter().lng+"_E";
window.open(url, '_blank'); window.open(url, '_blank');


+ 1
- 0
templates/macro.html.twig View File

@ -56,6 +56,7 @@ Où :
Voir sur Voir sur
<button class="btn btn-sm btn-link" data-action="map#openInOsm">OSM</button> <button class="btn btn-sm btn-link" data-action="map#openInOsm">OSM</button>
<button class="btn btn-sm btn-link" data-action="map#openInPanoramax">Panoramax</button> <button class="btn btn-sm btn-link" data-action="map#openInPanoramax">Panoramax</button>
<button class="btn btn-sm btn-link" data-action="map#openInPifomap">Pifomap</button>
<button class="btn btn-sm btn-link" data-action="map#openInGeohack">GeoHack</button> <button class="btn btn-sm btn-link" data-action="map#openInGeohack">GeoHack</button>
<button class="btn btn-sm btn-link" data-action="map#openInGeoportail">GéoPortail</button> <button class="btn btn-sm btn-link" data-action="map#openInGeoportail">GéoPortail</button>
<button class="btn btn-sm btn-link ça-pue-c’est-pas-libre" data-action="map#openInMapillary">Mapillary</button> <button class="btn btn-sm btn-link ça-pue-c’est-pas-libre" data-action="map#openInMapillary">Mapillary</button>


Loading…
Cancel
Save