Activity Location

32 views
Skip to first unread message

Henrique Carrer

unread,
Dec 28, 2022, 9:43:04 AM12/28/22
to Strava API
I'm coding a web app in which I need to showcase how many different states the user has registered any kind of activity in.
For that I need to have access to the activity location_state, location_city and location_country.

The problem is: as I found here, all of the above were deprecated. What other way can I get those infos?

My current solution is getting the start_latlng and with those make an api call to reverse geolocate the lat and longitude! This seems horrible since I'll have to make a request for each activity recorded in my account.

Do any of you know a better way?

Jan M.

unread,
Dec 29, 2022, 12:11:40 PM12/29/22
to Strava API
I don't see another reliable way to get the start and end address than using the latitudes and longitudes. At least the location_country is still provided. You could use the city and state of the segments of the activity if there are any before you reverse geolocate.

ActivityFix

unread,
Jan 6, 2023, 2:58:42 PM1/6/23
to Strava API
If you are able to run rust applications on your webserver take a look at https://github.com/gx0r/rrgeo. It's a small application which uses a simple lookup table to reverse geocode. It's not as accurate as an online service like Google places, but it's free and will be plenty accurate at a state-level granularity.
Reply all
Reply to author
Forward
0 new messages