diff --git a/docs/services.md b/docs/services.md index 3b7bfd98..48c7d61b 100644 --- a/docs/services.md +++ b/docs/services.md @@ -198,8 +198,8 @@ inhabitants (\~22750 cities), through either: - optional e.g. `?city=heidelberg&ISO3166alpha2=ZA` * by `id` - this uses the `city::country` "id" value, e.g. `lecce::italy` -* by `geolatitude` & `geolongitude` & `geodistance` - - `geodistance` is to be given in meters +* by `geoLatitude` & `geoLongitude` & `geoDistance` + - `geoDistance` is to be given in meters #### Response options diff --git a/src/hooks/api.js b/src/hooks/api.js index e4c3c11e..7bf01c15 100644 --- a/src/hooks/api.js +++ b/src/hooks/api.js @@ -113,9 +113,9 @@ export function validateBeaconQuery(queryData) { export function mkGeoParams(geoCity, geodistanceKm) { if (!geoCity) return null const coordinates = geoCity.data.geoLocation.geometry.coordinates ?? [] - const [geolongitude, geolatitude] = coordinates - const geodistance = geodistanceKm ? geodistanceKm * 1000 : 100 * 1000 - return { geolongitude, geolatitude, geodistance } + const [geoLongitude, geoLatitude] = coordinates + const geoDistance = geodistanceKm ? geodistanceKm * 1000 : 100 * 1000 + return { geoLongitude, geoLatitude, geoDistance } } export function mkGeneParams(gene) {