From 0cd6697fd4776c9725da531511f2f1893707b8b6 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Thu, 8 Jan 2026 23:20:41 +0000 Subject: [PATCH] Show a map of the user's current location for setting a pool. --- public-report/page.go | 2 +- .../component/location-geocode-header.html | 6 +- .../template/component/map-header.html | 103 ++++++++++++++++++ public-report/template/component/map.html | 84 ++++++++++++++ public-report/template/pool.html | 99 ++++++++--------- 5 files changed, 239 insertions(+), 55 deletions(-) create mode 100644 public-report/template/component/map-header.html create mode 100644 public-report/template/component/map.html diff --git a/public-report/page.go b/public-report/page.go index 284cbc0e..8d4a2820 100644 --- a/public-report/page.go +++ b/public-report/page.go @@ -41,7 +41,7 @@ var ( Status = buildTemplate("status", "base") ) -var components = [...]string{"footer", "location-geocode", "location-geocode-header", "photo-upload", "photo-upload-header"} +var components = [...]string{"footer", "location-geocode", "location-geocode-header", "map", "map-header", "photo-upload", "photo-upload-header"} func buildTemplate(files ...string) *htmlpage.BuiltTemplate { subdir := "public-report" diff --git a/public-report/template/component/location-geocode-header.html b/public-report/template/component/location-geocode-header.html index 29996131..f844cf14 100644 --- a/public-report/template/component/location-geocode-header.html +++ b/public-report/template/component/location-geocode-header.html @@ -36,9 +36,6 @@ } + + + +{{end}} diff --git a/public-report/template/component/map.html b/public-report/template/component/map.html new file mode 100644 index 00000000..75e8a175 --- /dev/null +++ b/public-report/template/component/map.html @@ -0,0 +1,84 @@ +{{define "map"}} + + + + +{{end}} diff --git a/public-report/template/pool.html b/public-report/template/pool.html index 636206fb..370b4f0c 100644 --- a/public-report/template/pool.html +++ b/public-report/template/pool.html @@ -3,54 +3,55 @@ {{define "title"}}Green Pool{{end}} {{define "extraheader"}} {{template "location-geocode-header" .}} +{{template "map-header" .}} {{template "photo-upload-header"}} {{end}} {{define "content"}} @@ -106,11 +107,7 @@

You can also click on the map to mark the location precisely

-
- -

Interactive Map

-

Click to set the location of the mosquito source

-
+