diff --git a/themes/intotheeast/blueprints/trip.yaml b/themes/intotheeast/blueprints/trip.yaml
index 6a4c1e8..471c26c 100644
--- a/themes/intotheeast/blueprints/trip.yaml
+++ b/themes/intotheeast/blueprints/trip.yaml
@@ -55,6 +55,30 @@ form:
placeholder: '6 weeks from Venice to Sicily by train'
help: 'Short description shown on homepage highlight cards'
+ header.use_gpx:
+ type: toggle
+ label: Show GPX tracks
+ help: 'Display GPX route files on the map'
+ highlight: 1
+ default: 1
+ options:
+ 1: 'Yes'
+ 0: 'No'
+ validate:
+ type: bool
+
+ header.autoconnect:
+ type: toggle
+ label: Connect markers
+ help: 'Draw connector lines between location markers (suppressed where GPX covers the route)'
+ highlight: 1
+ default: 1
+ options:
+ 1: 'Yes'
+ 0: 'No'
+ validate:
+ type: bool
+
publishing:
type: tab
title: Publishing
diff --git a/themes/intotheeast/js/maplibre-utils.js b/themes/intotheeast/js/maplibre-utils.js
index fb51707..a46f0a8 100644
--- a/themes/intotheeast/js/maplibre-utils.js
+++ b/themes/intotheeast/js/maplibre-utils.js
@@ -223,8 +223,13 @@
* - GPX present, pair NOT covered by any single file → connector drawn
* - force_connect on arriving entry → always draw connector
*/
- function buildJourneySegments(entries, allTrackpoints, thresholdKm) {
- thresholdKm = thresholdKm || 10;
+ /*
+ * opts.autoconnect (bool, default true): when false, only entries with
+ * force_connect:true are connected — all other pairs are left unconnected.
+ */
+ function buildJourneySegments(entries, allTrackpoints, thresholdKm, opts) {
+ thresholdKm = thresholdKm || 10;
+ var autoconnect = !opts || opts.autoconnect !== false;
var hasGpx = allTrackpoints && allTrackpoints.length > 0;
var segments = [];
var current = [];
@@ -241,7 +246,11 @@
var prev = entries[i - 1];
var connect;
- if (!hasGpx || e.force_connect) {
+ if (e.force_connect) {
+ connect = true;
+ } else if (!autoconnect) {
+ connect = false;
+ } else if (!hasGpx) {
connect = true;
} else {
var pLat = parseFloat(prev.lat);
@@ -295,7 +304,7 @@
* When gpxUrls is empty, Promise.all resolves immediately → no GPX layers,
* buildJourneySegments draws a full connector line between all entries.
*/
- function renderGpxJourney(map, gpxUrls, entries, gpxSourcePrefix, journeySourceId) {
+ function renderGpxJourney(map, gpxUrls, entries, gpxSourcePrefix, journeySourceId, opts) {
Promise.all(gpxUrls.map(function (url, idx) {
return fetch(url)
.then(function (r) { return r.text(); })
@@ -314,7 +323,7 @@
.catch(function (err) { console.warn('GPX load failed:', url, err); return []; });
})).then(function (allTrackpoints) {
var valid = allTrackpoints.filter(function (tp) { return tp.length > 0; });
- var segments = buildJourneySegments(entries, valid, 10);
+ var segments = buildJourneySegments(entries, valid, 10, opts);
addJourneySegments(map, segments, journeySourceId);
});
}
diff --git a/themes/intotheeast/templates/dailies.html.twig b/themes/intotheeast/templates/dailies.html.twig
index 955d5fb..6602a43 100644
--- a/themes/intotheeast/templates/dailies.html.twig
+++ b/themes/intotheeast/templates/dailies.html.twig
@@ -53,6 +53,8 @@
{% endif %}
diff --git a/themes/intotheeast/templates/map.html.twig b/themes/intotheeast/templates/map.html.twig
index 322fe24..cecd355 100644
--- a/themes/intotheeast/templates/map.html.twig
+++ b/themes/intotheeast/templates/map.html.twig
@@ -42,8 +42,10 @@
{% endblock %}
diff --git a/themes/intotheeast/templates/trip.html.twig b/themes/intotheeast/templates/trip.html.twig
index a1e2297..c1ec930 100644
--- a/themes/intotheeast/templates/trip.html.twig
+++ b/themes/intotheeast/templates/trip.html.twig
@@ -298,7 +298,9 @@