# getRoutes()

Al invocar este método, se obtienen todas las rutas del cliente en formato JSON.

<div id="bkmrk-"></div><div id="bkmrk-ejemplo-de-solicitud"><span style="color: #bbbbbb; font-size: 1.4em; font-weight: 400;">Ejemplo de solicitud en JS:</span></div>```JavaScript
try {
      const routes  = await _gpsApiv2.getRoutes(dataDriver); 
 	} catch (error) {
	  console.error(error);
	}
```

<details class="mb-m" id="bkmrk-body-parametersparam"><summary class="text-muted">A continuación se describen los atributos que se reciben como respuesta de la solicitud en JSON:</summary>

<div></div><div><table class="table" style="height: 656px; width: 619px;" width="811"><tbody><tr style="height: 41px;"><th style="width: 320px; height: 41px;">Atributos</th><th style="width: 301px; height: 41px;">Definición </th></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**id**</td><td style="width: 301px; height: 41px;">Identificador único de la ruta en el sistema</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**nombre**</td><td style="width: 301px; height: 41px;">Nombre con el que se identifica la ruta en el sistema

</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**distancia**</td><td style="width: 301px; height: 41px;">Distancia en metros para considerar que se llegó a un lugar, éste valor aplica para los lugares distLleg=0</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**lugares**</td><td style="width: 301px; height: 41px;">Información de los lugares que conforman la ruta</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**waypoints**</td><td style="width: 301px; height: 41px;">Puntos de referencia entre lugares de la ruta</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**puntos**</td><td style="width: 301px; height: 41px;">Rutas calculadas a través de la API de Google</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**rutas**</td><td style="width: 301px; height: 41px;">Geocercas de tipo ruta</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**sinoGarmin**</td><td style="width: 301px; height: 41px;">Indica si el dispositivo GPS tiene integrado un sistema con pantalla Garmin

</td></tr><tr><td style="width: 320px;">**useRoutePlaces  
</td><td style="width: 301px;">Indica si debe usar los puntos de la ruta original o de la ruta programada

</td></tr></tbody></table>

</div></details>##### Respuesta de ejemplo:

```JSON
[0:{
	 distancia:'50'
	 id:'12625'
	 lugares:[
			 0:{
				 completado:'0'
				 distLleg:0
				 dist_pa:0
				 fEstimada:''
				 id:'35028360481231212'
				 latLng:'19.053808699103097,-98.22219810023466'
				 nombre:'Mr. Pampas'
				 orden:'1'
				 orientacion:'1'
				 timeBetween:''
				 tipo:0
				 tolerancia:0
			 }, .. : {..}
		 ], .. : [..]
	 nombre:'Ruta Juárez'
	 puntos:[
			 p1-p2:{
				 0:{lat:19.0537, lng: -98.22231}
				 1:{lat:19.0537, lng: -98.22231}
				 2:{lat:19.0537, lng: -98.22231}
				 .. : {..}
			 }, p2-p3 : [..], ... , px-py : [..]
	 ], 
	 rutas:[]
	 sinoGarmin:'./Iconos/Vehiculos/CarIcon.png'
	 useRoutePlaces:'13953'
	 waypoints:[
			 p1-p2:[]
			 p1-p2:[]
			 ...
			 px-py:[]
	 ]
}
1: {...}]

```