How do you track movement of bike using phone's location?

Hello friends!

I am trying to build a bike tracker app that would allow me to keep track any bicycling activity statistics, maps, graph and others data in one app. I just started with the app and have so far tried to build a map with Navigation service, but my app does not work. It detects the current location accurately but does not navigate on map as my bike moves. Here is the screenshot of my code. Can anyone please tell me what am I doing wrong here?

my_bike_tracking.aia (118.7 KB)


1 Like

Use this :

Any advice depends on what you expect.

Perhaps

  • this may be as simple as following Shubhamr69's advice to re-center your Map using the current latitude/longitude.
  • Adjusting the LocationSensor's TimeInterval to more frequently attempt to sample a satellite fix. The default is once ever minute (60 seconds .. 60000 ms)
  • or if you need a new set of directions continuously, request the the plot using
    requestdirections in the appropriate place (s) in your code.- and use the

gotDidrections
Block to redisplay your navigation plot.

Thanks for reminding. I forgot to tell that.

You can set it to 1000 to keep things normal.

But if you want more preciseness, set it to 0.