From 5d3d854f5e63b9b87b792fcbe9d0a1b7dc70adf9 Mon Sep 17 00:00:00 2001 From: HUOT Anthony <98626139+PaRaDiiZe@users.noreply.github.com> Date: Tue, 4 Apr 2023 10:23:15 +0200 Subject: [PATCH] Fix --- public/js/parc.js | 31 +++++++++++++++++++++--------- templates/parcours/edit.html.twig | 2 +- templates/parcours/index.html.twig | 2 ++ 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/public/js/parc.js b/public/js/parc.js index 34eb775d..96a65d4f 100644 --- a/public/js/parc.js +++ b/public/js/parc.js @@ -20,7 +20,7 @@ if (document.title === "Quartier de la gare") { // Définition des points de départ, d'arrivée et intermédiaire var origin = new google.maps.LatLng(48.58861841512219, 7.739774935592602); var destination = new google.maps.LatLng(48.58328965384768, 7.737759155541721); - var waypoints = [{ + var waypoint = [{ location: new google.maps.LatLng(48.588073066476845, 7.739385182463061), stopover: true }, @@ -40,7 +40,7 @@ if (document.title === "Quartier de la gare") { } else if (document.title === "Quartier Européen") { var origin = new google.maps.LatLng(48.59887611306426, 7.761044511363163); var destination = new google.maps.LatLng(48.59885174143995, 7.767867642049826); - var waypoints = [{ + var waypoint = [{ location: new google.maps.LatLng(48.59961917302625, 7.767748555542351), stopover: true }, @@ -56,7 +56,7 @@ if (document.title === "Quartier de la gare") { } else if (document.title === "Quartier Krutenau") { var origin = new google.maps.LatLng(48.58179086060664, 7.753621155541689); var destination = new google.maps.LatLng(48.5816273723293, 7.7577451401983595); - var waypoints = [{ + var waypoint = [{ location: new google.maps.LatLng(48.58351103558638, 7.754583370885105), stopover: true }, @@ -81,10 +81,10 @@ if (document.title === "Quartier de la gare") { stopover: true } ]; -} else if (document.title === "Quartier Port Du Rhin") { +} else if (document.title === "Quartier Port du Rhin") { var origin = new google.maps.LatLng(48.57044498075201, 7.795164740197958); var destination = new google.maps.LatLng(48.576475872912404, 7.791613955541507); - var waypoints = [{ + var waypoint = [{ location: new google.maps.LatLng(48.57037740453426, 7.79452667127116), stopover: true }, @@ -97,16 +97,29 @@ if (document.title === "Quartier de la gare") { stopover: true }, ]; +} else if (document.title === "Bischheim") { + var origin = new google.maps.LatLng(48.61295623900399, 7.766584324856144); + var destination = new google.maps.LatLng(48.61585285079364, 7.73338894019959); + var waypoint = [{ + location: new google.maps.LatLng(48.61317333882106, 7.765128240199487), + stopover: true + }, + { + location: new google.maps.LatLng(48.61454333766624, 7.758777026707021), + stopover: true + }, + { + location: new google.maps.LatLng(48.614179964268445, 7.738271879253852), + stopover: true + }, + ]; } // Configuration de la demande d'itinéraire var request = { origin: origin, destination: destination, - waypoints: [{ - location: waypoint, - stopover: true - }], + waypoints: waypoint, travelMode: google.maps.TravelMode.WALKING }; diff --git a/templates/parcours/edit.html.twig b/templates/parcours/edit.html.twig index 14226840..cf30a705 100644 --- a/templates/parcours/edit.html.twig +++ b/templates/parcours/edit.html.twig @@ -2,7 +2,7 @@ {% block title %}Edit Parcours{% endblock %} -{% block body %} +{% block main %} <h1>Edit Parcours</h1> {{ include('parcours/_form.html.twig', {'button_label': 'Update'}) }} diff --git a/templates/parcours/index.html.twig b/templates/parcours/index.html.twig index bfdbc7d6..e07c1277 100644 --- a/templates/parcours/index.html.twig +++ b/templates/parcours/index.html.twig @@ -51,7 +51,9 @@ <i class="bi bi-star-fill"></i> </div> </div> + {% if parcour.relaOeuvre.first().photo is defined %} <img src="{{parcour.relaOeuvre.first().photo}}" alt="{{parcour.relaOeuvre.first().altImg}}"> + {% endif %} </div> </a> </div> -- GitLab