# Get distance

![](/files/-MP_CWhHV7Ssb5yj68_a)

La función Get distance permite obtener la distancia de un punto geográfico A a un punto geográfico B; pudiendo ser distancia por ruta o distancia lineal.

La distancia de ruta es calculada por los servidores de Google, mientras que la distancia lineal es del forma interna por la lógica de Apphive.

La distancia por ruta retorna la distancia de la ruta optima, esta ruta optima al ser calculada por los servidores de Google, puede retornarte la ruta con menor distancia o la ruta con menor tiempo de recorrido, para poder llegar de un punto a otro.

[Información general](https://docs.apphive.io/reference/funciones/informacion-general-de-las-funciones)


---

# 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://docs.apphive.io/apphive-documentacion/reference/funciones/geolocalization/get-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.
