From b85deb229f57f36e8630c3b391b234f1f8c15d9c Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Fri, 17 Apr 2026 03:07:16 +0000 Subject: [PATCH] Improve padding for multiple marker points --- ts/components/MapLocator.vue | 2 +- ts/view/review/Site.vue | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ts/components/MapLocator.vue b/ts/components/MapLocator.vue index fb7c679d..0505862d 100644 --- a/ts/components/MapLocator.vue +++ b/ts/components/MapLocator.vue @@ -447,7 +447,7 @@ function panToMarkers(markers: Marker[]) { const bounds = boundsMarkers(markers); map.value.fitBounds( bounds, - { padding: 10, duration: 1000 }, + { padding: 100, duration: 1000 }, { isInternalUpdate: true }, ); console.log("fitting map to bounds", bounds); diff --git a/ts/view/review/Site.vue b/ts/view/review/Site.vue index b2ee9165..76ff7263 100644 --- a/ts/view/review/Site.vue +++ b/ts/view/review/Site.vue @@ -88,13 +88,23 @@ const mapMarkers = computed(() => { if (!(site && site.address.location)) { return []; } - const markers = { - color: "#FF0000", - draggable: false, - id: "address", - location: site.address.location, - }; - return [markers]; + let markers = [ + { + color: "#FF0000", + draggable: false, + id: "address", + location: site.address.location, + }, + ]; + for (const feature of site.features) { + markers.push({ + color: "#00FF00", + draggable: false, + id: feature.id.toString(), + location: feature.location, + }); + } + return markers; }); async function doRequestComplianceMailer(id: number) { submitting.value = true;