Properly convert browser accuracy units

This commit is contained in:
Eli Ribble 2026-02-06 15:41:21 +00:00
parent d0b28d7f59
commit e001d23457
No known key found for this signature in database

View file

@ -51,6 +51,7 @@ func geospatialFromForm(r *http.Request) (GeospatialData, error) {
resolution = 10 resolution = 10
// This is a special indicator that we got our location from the browser measurements // This is a special indicator that we got our location from the browser measurements
case "meters": case "meters":
case "browser":
accuracy_in_meters, err := strconv.ParseFloat(accuracy_value, 64) accuracy_in_meters, err := strconv.ParseFloat(accuracy_value, 64)
if err != nil { if err != nil {
return GeospatialData{Populated: false}, fmt.Errorf("Failed to parse '%s' as an accuracy in meters: %v", accuracy_value, err) return GeospatialData{Populated: false}, fmt.Errorf("Failed to parse '%s' as an accuracy in meters: %v", accuracy_value, err)