airgradienthq / map

Other
8 stars 2 forks source link

Radius set too high #3

Closed sleien closed 1 year ago

sleien commented 1 year ago

On https://map.airgradient.com/ currently there is an error:

{"detail":[{"loc":["query","radius"],"msg":"ensure this value is less than or equal to 25000","type":"value_error.number.not_le"}]}

the radius is set to 100000 for every request here:

getOaqRequest() {
    return this.http.get("https://api.openaq.org/v2/locations?offset=0&sort=desc&order_by=lastUpdated&dumpRaw=false&limit=5000&coordinates=" + this.currentLatitide + "," + this.currentLongitude + "&radius=100000")
}

I don't see a way to manipulate the radius on the UI, so it should be set to a max of 25000.

I can't find it in the repo code...

sleien commented 1 year ago

Just checked with the current code and it's fixed but apparently not deployed yet. There are also 3 places with staging. hard coded.