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:
parent
2e74f95e8c
commit
b542b8268e
21 changed files with 353 additions and 62 deletions
9
html.go
9
html.go
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue