update 2024 copyrigth and timezone problem

This commit is contained in:
Ben
2024-06-18 17:34:32 +02:00
parent 98f5a674c0
commit 845c4c12ac
3 changed files with 65 additions and 54 deletions

View File

@@ -1,15 +1,17 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang='fr'> <html lang='fr'>
<head> <head>
<meta charset='utf-8'> <meta charset='utf-8'>
<title>Où est mon bus ?</title> <title>Où est mon bus ?</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'> <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'>
<meta name='description' content= <meta name='description'
'Carte interactive basée sur OpenStreetMap des stations de bus de Rennes Métropole, avec affichage des horaires et des bus en temps réel.'> content='Carte interactive basée sur OpenStreetMap des stations de bus de Rennes Métropole, avec affichage des horaires et des bus en temps réel.'>
<meta name='keywords' content='Rennes, Open Data, Horaire, Bus, Métro, Horaires, Temps Réel, OpenStreepMap, Star, Keolis'> <meta name='keywords'
content='Rennes, Open Data, Horaire, Bus, Métro, Horaires, Temps Réel, OpenStreepMap, Star, Keolis'>
<meta name='author' content='Benoît Meunier et Karin Meunier'> <meta name='author' content='Benoît Meunier et Karin Meunier'>
<meta name='publisher' content='Benoît Meunier'> <meta name='publisher' content='Benoît Meunier'>
<meta name='copyright' content='Copyright 2015-2023 Benoît Meunier et Karin Meunier'> <meta name='copyright' content='Copyright 2015-2024 Benoît Meunier et Karin Meunier'>
<link rel='apple-touch-icon' sizes='57x57' href='./apple-touch-icon-57x57.png'> <link rel='apple-touch-icon' sizes='57x57' href='./apple-touch-icon-57x57.png'>
<link rel='apple-touch-icon' sizes='60x60' href='./apple-touch-icon-60x60.png'> <link rel='apple-touch-icon' sizes='60x60' href='./apple-touch-icon-60x60.png'>
<link rel='apple-touch-icon' sizes='72x72' href='./apple-touch-icon-72x72.png'> <link rel='apple-touch-icon' sizes='72x72' href='./apple-touch-icon-72x72.png'>
@@ -37,39 +39,41 @@
<link rel='stylesheet' href='./css/leaflet.photon.css'> <link rel='stylesheet' href='./css/leaflet.photon.css'>
<link rel='stylesheet' href='./css/leaflet.css'> <link rel='stylesheet' href='./css/leaflet.css'>
</head> </head>
<body> <body>
<div class='app-bar fixed-top darcula' data-role='appbar'> <div class='app-bar fixed-top darcula' data-role='appbar'>
<ul class='app-bar-menu'> <ul class='app-bar-menu'>
<li> <li>
<a href='javascript:void(0)' id='ouestmonbus_btn' class='bg-hover-green bg-emerald fg-white' data-hint-color= <a href='javascript:void(0)' id='ouestmonbus_btn' class='bg-hover-green bg-emerald fg-white'
"fg-white" data-hint-background="bg-green" data-role="hint" data-hint="Nouveautés|de l'application" data-hint-color="fg-white" data-hint-background="bg-green" data-role="hint"
data-hint-mode="2"><img height="72" width="72" style="height: 3.125rem; width:3.125rem; display: inline-block;" src='./android-chrome-72x72.png' alt= data-hint="Nouveautés|de l'application" data-hint-mode="2"><img height="72" width="72"
'logo'></a> style="height: 3.125rem; width:3.125rem; display: inline-block;" src='./android-chrome-72x72.png'
alt='logo'></a>
</li> </li>
<li class="bar_button"> <li class="bar_button">
<a data-hint="Géolocalisation|positionnement automatique" data-hint-mode="2" data-hint-color="fg-white" <a data-hint="Géolocalisation|positionnement automatique" data-hint-mode="2" data-hint-color="fg-white"
data-hint-background="bg-cobalt" data-role="hint" class="bg-cobalt bg-hover-cyan" href='javascript:void(0)' id= data-hint-background="bg-cobalt" data-role="hint" class="bg-cobalt bg-hover-cyan" href='javascript:void(0)'
'localise_btn'><span class='mif-location'></span></a> id='localise_btn'><span class='mif-location'></span></a>
</li> </li>
<li class="bar_button"> <li class="bar_button">
<a data-hint="Rechercher|un lieu sur la carte" data-hint-mode="2" data-hint-color="fg-white" <a data-hint="Rechercher|un lieu sur la carte" data-hint-mode="2" data-hint-color="fg-white"
data-hint-background="bg-orange" data-role="hint" class="bg-orange bg-hover-amber" href='javascript:void(0)' data-hint-background="bg-orange" data-role="hint" class="bg-orange bg-hover-amber" href='javascript:void(0)'
id='address_btn'><span class='mif-search'></span></a> id='address_btn'><span class='mif-search'></span></a>
</li> </li>
<li class="bar_button"> <li class="bar_button">
<a data-hint="Infos trafic|chargement en cours" data-hint-mode="2" data-hint-color="fg-white" <a data-hint="Infos trafic|chargement en cours" data-hint-mode="2" data-hint-color="fg-white"
data-hint-background="bg-red" data-role="hint" class="bg-red bg-hover-lightRed" href='javascript:void(0)' id= data-hint-background="bg-red" data-role="hint" class="bg-red bg-hover-lightRed" href='javascript:void(0)'
'perturbations_btn'><span class='mif-info'></span></a> id='perturbations_btn'><span class='mif-info'></span></a>
</li> </li>
<li class="bar_button"> <li class="bar_button">
<a data-hint="Options|et paramétrage" data-hint-mode="2" data-hint-color="fg-white" data-hint-background= <a data-hint="Options|et paramétrage" data-hint-mode="2" data-hint-color="fg-white"
"bg-steel" data-role="hint" class="bg-steel bg-hover-lime" href='javascript:void(0)' id= data-hint-background="bg-steel" data-role="hint" class="bg-steel bg-hover-lime" href='javascript:void(0)'
'config_btn'><span class='mif-cogs'></span></a> id='config_btn'><span class='mif-cogs'></span></a>
</li> </li>
<li class="bar_button"> <li class="bar_button">
<a data-hint="Aide|et informations" data-hint-mode="2" data-hint-color="fg-white" data-hint-background= <a data-hint="Aide|et informations" data-hint-mode="2" data-hint-color="fg-white"
"bg-yellow" data-role="hint" class="bg-yellow bg-hover-lime" href='javascript:void(0)' id= data-hint-background="bg-yellow" data-role="hint" class="bg-yellow bg-hover-lime" href='javascript:void(0)'
'about_btn'><span class='mif-question'></span></a> id='about_btn'><span class='mif-question'></span></a>
</li> </li>
</ul> </ul>
</div> </div>
@@ -77,7 +81,7 @@
<div id='progressbar'></div> <div id='progressbar'></div>
<div class='app-container'> <div class='app-container'>
<div data-role='dialog' data-color='fg-white' data-background='bg-gray' data-close-button='true' id='about_dlg' <div data-role='dialog' data-color='fg-white' data-background='bg-gray' data-close-button='true' id='about_dlg'
class='padding10 dialogontop'> class='padding10 dialogontop'>
<div class='panel'> <div class='panel'>
<div class='heading'> <div class='heading'>
<span class='title'>A quoi ça sert ?</span> <span class='title'>A quoi ça sert ?</span>
@@ -92,8 +96,8 @@
</div> </div>
<div class='marginup10 align-right'><span id='version'></span></div> <div class='marginup10 align-right'><span id='version'></span></div>
</div> </div>
<div data-role='dialog' id='ouestmonbus_news_dlg' data-width="23rem" data-background='bg-gray' data-color= <div data-role='dialog' id='ouestmonbus_news_dlg' data-width="23rem" data-background='bg-gray' data-color='fg-white'
'fg-white' class='padding10 dialogontop' data-close-button='yes'> class='padding10 dialogontop' data-close-button='yes'>
<div class='panel'> <div class='panel'>
<div class='heading'> <div class='heading'>
<span class='title'>Nouveautés</span> <span class='title'>Nouveautés</span>
@@ -102,7 +106,7 @@
</div> </div>
</div> </div>
<div data-role='dialog' data-windows-style='true' id='localisation_failed_dlg' data-background='bg-gray' <div data-role='dialog' data-windows-style='true' id='localisation_failed_dlg' data-background='bg-gray'
data-color='fg-white' class='padding10 dialogontop' data-close-button='yes'> data-color='fg-white' class='padding10 dialogontop' data-close-button='yes'>
<div class='padding10'> <div class='padding10'>
<b>Impossible de vous localiser</b><br> <b>Impossible de vous localiser</b><br>
<br> <br>
@@ -111,7 +115,7 @@
</div><button id='localisation_failed_dlg_close' class='button place-right'>OK</button> </div><button id='localisation_failed_dlg_close' class='button place-right'>OK</button>
</div> </div>
<div data-role='dialog' data-windows-style='true' id='localisation_nothere_dlg' data-background='bg-gray' <div data-role='dialog' data-windows-style='true' id='localisation_nothere_dlg' data-background='bg-gray'
data-color='fg-white' class='padding10 dialogontop' data-close-button='yes'> data-color='fg-white' class='padding10 dialogontop' data-close-button='yes'>
<div class='padding10'> <div class='padding10'>
<b>Impossible de vous localiser</b><br> <b>Impossible de vous localiser</b><br>
<br> <br>
@@ -119,18 +123,18 @@
Utilisez la saisie d'un lieu au clavier. Utilisez la saisie d'un lieu au clavier.
</div><button id='localisation_nothere_dlg_close' class='button place-right'>OK</button> </div><button id='localisation_nothere_dlg_close' class='button place-right'>OK</button>
</div> </div>
<div data-role='dialog' data-windows-style='true' id='api_time_failure_dlg' data-background='bg-red' data-color= <div data-role='dialog' data-windows-style='true' id='api_time_failure_dlg' data-background='bg-red'
'fg-white' class='padding10 dialogontop' data-close-button='yes'> data-color='fg-white' class='padding10 dialogontop' data-close-button='yes'>
<b>Problème technique: l'heure remontée par le service OpenData Keolis indique un décalage de plus de 30 <b>Problème technique: l'heure remontée par le service OpenData Keolis indique un décalage de plus de 30
minutes.<br> minutes.<br>
Les données ne sont plus en temps réel.</b> Les données ne sont plus en temps réel.</b>
</div> </div>
<div data-role='dialog' id='trafic_dlg' data-width="23rem" data-color='fg-black' data-background='bg-gray' <div data-role='dialog' id='trafic_dlg' data-width="23rem" data-color='fg-black' data-background='bg-gray'
data-close-button='true' class='padding10 dialogontop'> data-close-button='true' class='padding10 dialogontop'>
<div id='trafic_dlg_content' class='bg-white' style='overflow-y:scroll;'></div> <div id='trafic_dlg_content' class='bg-white' style='overflow-y:scroll;'></div>
</div> </div>
<div data-role='dialog' id='config_dlg' data-width="23rem" data-color='fg-black' data-background='bg-gray' class= <div data-role='dialog' id='config_dlg' data-width="23rem" data-color='fg-black' data-background='bg-gray'
'padding10 dialogontop'> class='padding10 dialogontop'>
<div class='padding10 bg-white'> <div class='padding10 bg-white'>
<div class="panel"> <div class="panel">
<div class='heading'> <div class='heading'>
@@ -138,8 +142,8 @@
</div> </div>
<div class="bg-white" style="line-height: 1.5em;"> <div class="bg-white" style="line-height: 1.5em;">
<br> <br>
<span>Afficher toutes les stations</span> <label class="switch place-right"><input id= <span>Afficher toutes les stations</span> <label class="switch place-right"><input
"all_stations_checkbox" type="checkbox"> <span class="check place-right"></span></label><br> id="all_stations_checkbox" type="checkbox"> <span class="check place-right"></span></label><br>
</div> </div>
</div> </div>
</div> </div>
@@ -157,6 +161,7 @@
<script src='./js/Leaflet.MovingMarker.js'></script> <script src='./js/Leaflet.MovingMarker.js'></script>
<script src='./js/leaflet.photon.js'></script> <script src='./js/leaflet.photon.js'></script>
<script src='./js/moment.min.js'></script> <script src='./js/moment.min.js'></script>
<script src='./js/moment-timezone-with-data.min.js'></script>
<script src='./js/underscore.min.js'></script> <script src='./js/underscore.min.js'></script>
<script src='./js/mobile-detect.min.js'></script> <script src='./js/mobile-detect.min.js'></script>
<script src='./js/progressbar.min.js'></script> <script src='./js/progressbar.min.js'></script>
@@ -164,8 +169,9 @@
<script id='appscript' src='./ouestmonbus.js?%VERSION%'></script> <script id='appscript' src='./ouestmonbus.js?%VERSION%'></script>
<script> <script>
var app = new OuestmonbusApp(); var app = new OuestmonbusApp();
app.init(); app.init();
</script> </script>
</body> </body>
</html> </html>

1
js/moment-timezone-with-data.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
/** /**
* @file ouestmonbus.com main source file. * @file ouestmonbus.com main source file.
* *
* @copyright Benoît Meunier & Karin Meunier - 2015-2023 * @copyright Benoît Meunier & Karin Meunier - 2015-2024
* *
* @license * @license
* ouestmonbus.com is free software: you can redistribute it and/or modify * ouestmonbus.com is free software: you can redistribute it and/or modify
@@ -26,7 +26,7 @@ const STATION_LIST_REFRESH = 4 * 60 * 1000;
const version = '%VERSION%'; const version = '%VERSION%';
const date_version = '%DATEVERSION%'; const date_version = '%DATEVERSION%';
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone; const tz = 'Europe/Paris';
const apikey = "3324de385f6b7b5bdfa1727d3e1a9f4bed5dd1accb288db6df5e8487"; const apikey = "3324de385f6b7b5bdfa1727d3e1a9f4bed5dd1accb288db6df5e8487";
log.setLevel(1); log.setLevel(1);
@@ -298,6 +298,9 @@ OuestmonbusApp.prototype.initTexts = function () {
$("#version").html(`Version ${version} (${date_version})`); $("#version").html(`Version ${version} (${date_version})`);
$("#app_news").html(marked.parse(` $("#app_news").html(marked.parse(`
**18/06/2024:**
- Correction de l'affichage de l'heure avec le mauvais fuseau horaire.
**17/06/2024:** **17/06/2024:**
- Correction suite au changement de format des données GTFS. - Correction suite au changement de format des données GTFS.
@@ -406,7 +409,7 @@ OuestmonbusApp.prototype.initMap = function () {
// Ajout des mentions légals // Ajout des mentions légals
var legal = L.control.attribution({ var legal = L.control.attribution({
prefix: "<div id='legal_attribution'>&copy; 2015-2023 <a href='https://ouestmonbus.com'>ouestmonbus.com</a>" prefix: "<div id='legal_attribution'>&copy; 2015-2024 <a href='https://ouestmonbus.com'>ouestmonbus.com</a>"
}).addAttribution("<a href='http://osm.org/copyright'>OpenStreetMap</a> | <a href='https://data.explore.star.fr/page/home/'>Data Keolis Rennes Métropole</a></div>"); }).addAttribution("<a href='http://osm.org/copyright'>OpenStreetMap</a> | <a href='https://data.explore.star.fr/page/home/'>Data Keolis Rennes Métropole</a></div>");
legal.setPosition("bottomright"); legal.setPosition("bottomright");
legal.addTo(this.map); legal.addTo(this.map);
@@ -1748,6 +1751,7 @@ OuestmonbusApp.prototype.generateLineDeparture = function (localtime, time, accu
} }
} }
} }
departure.tz('Europe/Paris');
var t = departure.format("HH:mm:ss"); var t = departure.format("HH:mm:ss");
line_h = `<u>${t}</u> ${wait_str} ${retard_str}`; line_h = `<u>${t}</u> ${wait_str} ${retard_str}`;