# Sort By Distance

We already implement new feature **sort by distance** start on version 4.1. When user enable GPS this feature will automatically active. There 3 configuration you should to know.

you can see from file **data/AppConfig.java :**

```java
public static final boolean SORT_BY_DISTANCE = true;
public static final String DISTANCE_METRIC_CODE = "KILOMETER";
public static final String DISTANCE_METRIC_STR = "Km";
```

1\. You can disable this feature pernamenly by set **SORT\_BY\_DISTANCE** with false.

2\. We provide 2 option of metric, Kilometer and Mile. You only allowed to set **DISTANCE\_METRIC\_CODE** with value "KILOMETER" or "MILE.

3\. For string that display at user interface you can change on **DISTANCE\_METRIC\_STR** with your string. like : Mile, Mi, Kilo, Km, etc.


---

# 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://the-city.gitbook.io/docs/7.4/android/sort-by-distance.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.
