From a151ae15657ebdb2d6b8460ce1499a2508d8eb28 Mon Sep 17 00:00:00 2001
From: Oliver Heilig
Date: Sat, 3 Apr 2021 10:00:32 +0200
Subject: [PATCH] set incidents language
---
index.html | 12 +++++++++++-
index.js | 8 ++++++--
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index 59ac790b..c9d2f602 100644
--- a/index.html
+++ b/index.html
@@ -171,8 +171,18 @@
+
+
+ incidents Language
+
- Show imperial units
+ Show imperial units
Show static Route
/w dynamic Time
diff --git a/index.js b/index.js
index 606e92d9..cbd4b122 100644
--- a/index.js
+++ b/index.js
@@ -10,6 +10,7 @@ var enableTruckAttributes = false;
var dynamicTimeOnStaticRoute = true;
var staticTimeOnStaticRoute = true;
var itineraryLanguage = 'EN';
+var flLanguage = 'EN';
var routingProfile = 'truckfast';
var replaySpeed = 100;
var responses = null;
@@ -84,11 +85,12 @@ var getLayers = function (profile) {
imperial: useImperial,
beforeSend2: function (request) {
request.mapParams.referenceTime = hour.format();
- // include time domain for incidents
+ // set language and include time domain for incidents
if (incidentsLayer.visible)
request.callerContext.properties.push({
'key': 'ProfileXMLSnippet',
- 'value': ''
+ 'value': ''
});
}
});
@@ -197,6 +199,7 @@ $('#dynamicTimeOnStaticRoute').attr('checked', dynamicTimeOnStaticRoute);
$('#useImperial').attr('checked', useImperial);
$('#staticTimeOnStaticRoute').attr('checked', staticTimeOnStaticRoute);
$('#languageSelect').val(itineraryLanguage);
+$('#flLanguage').val(flLanguage);
$('#routingProfile').val(routingProfile);
$('#replaySpeed').val(replaySpeed);
$('#doLoop').attr('checked', doLoop);
@@ -291,6 +294,7 @@ var updateParams = function (refreshFeatureLayer) {
dynamicTimeOnStaticRoute = $('#dynamicTimeOnStaticRoute').is(':checked');
staticTimeOnStaticRoute = $('#staticTimeOnStaticRoute').is(':checked');
itineraryLanguage = $('#languageSelect option:selected').val();
+ flLanguage = $('#flLanguage option:selected').val();
useImperial = $('#useImperial').is(':checked');
routingProfile = $('#routingProfile option:selected').val();