Add precalc h3 cells to fieldseeker tables

This makes it so we don't have to try to parse the geometry JSON and
instead can just pass pre-calculated h3 values, which take fewer bytes,
everywhere.
This commit is contained in:
Eli Ribble 2026-01-05 23:25:16 +00:00
parent 2e74f95e8c
commit b542b8268e
21 changed files with 353 additions and 62 deletions

View file

@ -493,15 +493,20 @@ func htmlSource(w http.ResponseWriter, r *http.Request, user *models.User, id uu
return
}
treatment_models := modelTreatment(treatments)
latlng, err := s.H3Cell.LatLng()
if err != nil {
respondError(w, "Failed to get latlng", err, http.StatusInternalServerError)
return
}
data := ContentSource{
Inspections: inspections,
MapData: ComponentMap{
Center: s.LatLng,
Center: latlng,
//GeoJSON:
MapboxToken: MapboxToken,
Markers: []MapMarker{
MapMarker{
LatLng: s.LatLng,
LatLng: latlng,
},
},
Zoom: 13,