Save tiles to the database to make empty tile load faster

This commit is contained in:
Eli Ribble 2026-03-11 17:01:47 +00:00
parent a1e6f930cb
commit 3ccc05d4c5
No known key found for this signature in database
10 changed files with 559 additions and 98 deletions

View file

@ -46,8 +46,8 @@ func getTileGPS(w http.ResponseWriter, r *http.Request, org *models.Organization
return
}
w.Header().Set("Content-Type", "image/png")
w.Header().Set("Content-Length", fmt.Sprintf("%d", len(img)))
_, err = io.Copy(w, bytes.NewBuffer(img))
w.Header().Set("Content-Length", fmt.Sprintf("%d", len(img.Content)))
_, err = io.Copy(w, bytes.NewBuffer(img.Content))
if err != nil {
respondError(w, "copy bytes", err, http.StatusInternalServerError)
return