diff --git a/backend/data/journeys.json b/backend/data/journeys.json
index 9d7be41..66042b9 100644
--- a/backend/data/journeys.json
+++ b/backend/data/journeys.json
@@ -8,25 +8,28 @@
{
"lat": 46.638122462379656,
"lng": 4.806518554687501,
- "title": "New Marker",
- "date": "",
- "description": "",
- "videoUrl": ""
+ "title": "New test again",
+ "date": "2026-03-03",
+ "description": "asfasfadsfsa",
+ "image": "",
+ "videoUrl": "https://duckduckgo.com/?t=ffab&q=pythong+gif&ia=images&iax=images&iai=https%3A%2F%2Fmedia.tenor.com%2FfMUOPRVdSzUAAAAM%2Fpython.gif"
},
{
"lat": 47.12621341795227,
"lng": 6.943359375000001,
- "title": "New Marker",
+ "title": "safasf",
"date": "",
- "description": "",
+ "description": "sdfadsa",
+ "image": "",
"videoUrl": ""
},
{
"lat": 46.46813299215556,
"lng": 6.7730712890625,
- "title": "New Marker",
+ "title": "asfaf",
"date": "",
- "description": "",
+ "description": "asdfsafa",
+ "image": "",
"videoUrl": ""
}
],
@@ -34,6 +37,14 @@
"visibility": "private",
"shared_read": [],
"shared_edit": [],
- "comments": []
+ "comments": [
+ {
+ "id": 1774716476571,
+ "author_id": 1,
+ "author_name": "josh",
+ "text": "safasdf",
+ "created_at": "2026-03-28T17:47:56.571469"
+ }
+ ]
}
]
\ No newline at end of file
diff --git a/blog-post-edit.html b/blog-post-edit.html
deleted file mode 100644
index c063ada..0000000
--- a/blog-post-edit.html
+++ /dev/null
@@ -1,368 +0,0 @@
-
-
-
-
-
- Blog Post – Journey Mapper
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/blog-post.html b/blog-post.html
index cf47184..1605fec 100644
--- a/blog-post.html
+++ b/blog-post.html
@@ -319,7 +319,7 @@
${chaptersHtml}
${isOwner ? `
` : ''}
diff --git a/journey-edit.html b/journey-edit.html
new file mode 100644
index 0000000..f699c57
--- /dev/null
+++ b/journey-edit.html
@@ -0,0 +1,501 @@
+
+
+
+
+
+ Edit Journey – Journey Mapper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/map-page.html b/map-page.html
index c8c9fd1..13453bc 100644
--- a/map-page.html
+++ b/map-page.html
@@ -1009,41 +1009,33 @@
activeMarker = null;
}
- function saveMarker() {
+ async function saveMarker() {
if (!activeMarker) return;
- const title =
- document.getElementById("marker-title").value ||
- "Untitled";
+ const title = document.getElementById("marker-title").value || "Untitled";
const date = document.getElementById("marker-date").value;
- const description =
- document.getElementById("marker-text").value;
+ const description = document.getElementById("marker-text").value;
const videoUrl = document.getElementById("video-url").value;
-
- activeMarker.setTitle(title);
+
+ // Update marker's tooltip title and popup
+ activeMarker.options.title = title;
activeMarker.setPopupContent(`${title}`);
- activeMarker._content = {
- title,
- date,
- description,
- videoUrl,
- };
-
+
+ // Store content for saving
+ activeMarker._content = { title, date, description, videoUrl };
+
+ // Update the list item in the sidebar
const latlng = activeMarker.getLatLng();
- const items = document.querySelectorAll(
- "#current-markers-container .marker-item",
- );
+ const items = document.querySelectorAll("#current-markers-container .marker-item");
for (let item of items) {
- if (
- item.dataset.lat == latlng.lat &&
- item.dataset.lng == latlng.lng
- ) {
- item.querySelector(".marker-title").textContent =
- title;
+ if (item.dataset.lat == latlng.lat && item.dataset.lng == latlng.lng) {
+ item.querySelector(".marker-title").textContent = title;
break;
}
}
+
closeModal();
- showToast("Marker updated");
+ showToast("Saving journey...");
+ await saveJourneyToAPI();
}
function deleteMarkerFromMap() {