Returns the distance in meters and in seconds between two points according to the directions service of google maps.

<google.route.getRoute avoid='avoid'>    <lat_p1 /> +    <lng_p1 /> +    <lat_p2 /> +    <lng_p2 /> +</google.route.getRoute>

#### Ver tambien

Example

Calculate the distance in car between two points:

Copy
<xsql-script name=''>
<body>
<set name="lat1">41.324748</set>
<set name="lng1">2.092209</set>
<set name="lat2">41.401536</set>
<set name="lng2">2.134781</set>
<println>
<lat1 />
<lng1 />
<lat2 />
<lng2 />
</println>
</body>
</xsql-script>

Returns:

Copy
+---------------+----------------+------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|distance_meters|distance_seconds|status|error_message|polyline                                                                                                                                                                                                |
+---------------+----------------+------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|               |                |      |             |O{BuDqAgCw@wAsAyBcCkDmGgJwBwC_CmDcBeC}BiDcD{EqEoGwBaDqByCo@u@m@_Ac@y@qEsG_D_EuBiCg@s@mAcBKi@sCkE{A{BDWAc@Ka@QWWMUAUHURKTADAJeCzAyDbCkDrBsAv@cBx@iBn@q@PkKtCeCn@yDfAqBj@cFtAgFrAsEA{@TaAZiFtAoDp@cFlAcLt|
+---------------+----------------+------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Example

Calculate the distance in car between two points avoiding tolls:

Copy
<xsql-script name=''>
<body>
<set name="lat1">41.324748</set>
<set name="lng1">2.092209</set>
<set name="lat2">41.9794</set>
<set name="lng2">2.8214</set>
<println>
<lat1 />
<lng1 />
<lat2 />
<lng2 />
</println>
</body>
</xsql-script>

Returns:

Copy
+---------------+----------------+------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|distance_meters|distance_seconds|status|error_message|polyline                                                                                                                                                                                                |
+---------------+----------------+------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|               |                |      |             |ObGuQqBsUiQwQsTeRu\wHue@~A}v@{Kg_@oNkLiRaFsN{HsY{a@eNmSkNyK}Y}TkJgOeJcYyD_n@|I}gAOw@kJ}l@aKoa@cFej@iFya@}H{WcTu^_QmUe^mu@kPio@kMm\iUk]wTee@yN_r@gQ{a@qN}N_WcLgXuEiLwGgIwJgL{^qM{t@q\ofAaJ}@oCyp@pDig@x|
|               |                |      |             |BmnAoAwQwI{QkP{K_Ny@oQhCuPxGaGf@aCoA_Zk[e\g]mUkO_iAyr@wZkOaMo]gWcn@gD{G|IqXfIiaAlAyRlK_ZCyVkHy^wGcLy@wAxG{IlH}QlAsIqFoD_Nwc@iFkXlAuNnHmODkSbDkWfH{KmAyDaN}MgVwIiVoO{NwQ}PcBeOlAcIqBqU_Kk@ml@kHg\{Giz@a|
|               |                |      |             |EyRyLiVcMiZkEk\@ma@sFcS}Wqp@kOo\mR_XoMcSsN_Ha[iSyHcJuCoK\oTfIcj@y@yOeI{Twd@q|@}Fqe@yGuQaQeOiQqPcBiJsA{O{IaOwDiNgGmHeJaFqDyGkIsNmN_DmOkTqgA}eBg@_Ac~@_dAar@auAgB{IwCeB}MsXyBk[a@}JwE}N{DmOwTqtAsYqhBsa@mh|
|               |                |      |             |_PqJmVtCzAwP|RiBBoJtJoCdK{AlFYjAFbBwFbIuIt@sF~BiFjQwAzEgAzZoCKJHkDrZkYaMDg@                                                                                                                          |
+---------------+----------------+------+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+`