# Run

This is where the pathfinding algorithm is used. Users will be able to define the distance of the route they want to generate with the slider. We have limited the slider to a range of 1km to 20km, with increments of 0.5km. With the distance set, the user can hit the Generate Route button and have the app produce a route. If the user is unsatisfied with the route given, they can repeatedly generate another route until satisfied.

With a satisfied route, the user can begin their run by tapping on the Start Run button and the generated route (purple line) will still be kept on the next page. As the user runs, a blue line is drawn on the map to show the route the user has run so far.&#x20;

{% tabs %}
{% tab title="Route Generation" %}
&#x20;          ![](/files/-MenGCunfwcAKGpJbwEf)![](/files/-MenGCumyMVaL2e8gaCs)

&#x20;                                        *2 different routes of 2km at the same starting point*
{% endtab %}

{% tab title="Tracking" %}
![](/files/-MenGCuoyntsh1YGq9w0)
{% endtab %}
{% endtabs %}

For the implementation of the algorithm, see [here](/run-mania/software-development-process.md#auto-routing).\
For the implementation of the tracking, see [here](/run-mania/software-development-process.md#tracking-the-run).\
Do take note of the limitations ([Route generation](/run-mania/limitations.md#google-directions-api) and [Background tracking](/run-mania/limitations.md#background-location-tracking-for-ios-devices)) regarding this feature.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://run-mania.gitbook.io/run-mania/features/home/run.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
