From 711629682d17e6cf6aac17f7e636751a257e5a99 Mon Sep 17 00:00:00 2001 From: grabowski Date: Mon, 10 Aug 2026 17:20:12 +0700 Subject: [PATCH] feat: per-marker icon field for custom markers custom-markers.json entries accept an optional "icon" (any emoji, default pin); seeded homes/office icons for the existing markers. --- src/static/custom-markers.json | 10 +++++----- src/static/dashboard.html | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/static/custom-markers.json b/src/static/custom-markers.json index 47f6444..b313d09 100644 --- a/src/static/custom-markers.json +++ b/src/static/custom-markers.json @@ -1,7 +1,7 @@ [ - { "name": "newedge", "lat": 18.77208394455051, "lon": 98.98366920482054 }, - { "name": "Sunflower", "lat": 18.775240304156092, "lon": 98.98373200474349 }, - { "name": "white house", "lat": 18.77589874066847, "lon": 98.98363500976409 }, - { "name": "casa mia / b4l", "lat": 18.76974018178173, "lon": 98.9877579642922 }, - { "name": "baan boe", "lat": 18.77410496738743, "lon": 98.98474626480406 } + { "name": "newedge", "icon": "🏢", "lat": 18.77208394455051, "lon": 98.98366920482054 }, + { "name": "Sunflower", "icon": "🏠", "lat": 18.775240304156092, "lon": 98.98373200474349 }, + { "name": "white house", "icon": "🏠", "lat": 18.77589874066847, "lon": 98.98363500976409 }, + { "name": "casa mia / b4l", "icon": "🏠", "lat": 18.76974018178173, "lon": 98.9877579642922 }, + { "name": "baan boe", "icon": "🏠", "lat": 18.77410496738743, "lon": 98.98474626480406 } ] diff --git a/src/static/dashboard.html b/src/static/dashboard.html index e7f1f69..21dfcdb 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -731,7 +731,7 @@ if (!Number.isFinite(poi.lat) || !Number.isFinite(poi.lon)) return; const icon = L.divIcon({ className: 'marker-wrap', - html: '
📍
', + html: `
${escapeHtml(poi.icon || '📍')}
`, iconSize: [26, 26], iconAnchor: [13, 24], popupAnchor: [0, -22] }); const marker = L.marker([poi.lat, poi.lon], { icon, title: poi.name })