Google fit API: How to get a map of the route take

2019-08-01 23:20发布

问题:

I'm using Google Fit API to develop a fitness app.

Take a look at this picture of a google fit recorded session on the Google fit app: here

I would like to know if it's possible to get the map displayed at the top of the screen. In fact, I know how to call the History API to get sessions but I can't figure out how to get the map displaying the route taken during the activity by the user.

I found this possible duplicate topic (unanswered): Google fit api: get distance/calories/speed when tracking running/biking

Any help would be appreciated !

回答1:

With Reference to Google Developer Blog

Using the Maps API, you can show users their route, position, and place markers on the map they can tap to see more info you provide.
All of this functionality is available to you using the same Maps API you’ve already worked with on Android. Check out the doc,

DevByte

code sample

blog post

to learn more.