Properly convert browser accuracy units
This commit is contained in:
parent
d0b28d7f59
commit
e001d23457
1 changed files with 1 additions and 0 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue