B4J=true Group=Default Group ModulesStructureVersion=1 Type=Class Version=10 @EndOfDesignText@ Sub Class_Globals Private mreq As ServletRequest 'ignore Private mresp As ServletResponse 'ignore End Sub 'Initializes the object. You can add parameters to this method if needed. Public Sub Initialize End Sub 'Resumable Subs (wait for / sleep) in server handlers 'Resumable subs can only work when there is a message queue. 'By default, server handlers end when the Handle sub is completed. They do not create a message loop. 'If you want to wait for an event then you need to call StartMessageLoop and later StopMessageLoop. 'https://www.b4x.com/android/forum/threads/resumable-subs-wait-for-sleep-in-server-handlers.81833/ Sub Handle(req As ServletRequest, resp As ServletResponse) Log("##############################################################") Log("############# Ayuda/Handle ########################") Log("##############################################################") resp.ContentType = "text/html" resp.Write($"Son necesarios los siguientes parametros:
* r - La ruta
* a - El almacen
* c - Lista de puntos (id_cliente,lon,lat) separadas por punto y coma, el primer punto de la lista, se considera el punto de INICIO de la ruta.
* m - La matriz a usar LOCAL u OSRM (Opcional, default LOCAL)
* f - El destino final (id_cliente,lon,lat) de donde termina la ruta (Opcional)

Ej.: http://localhost:${Main.srvr.port}/ruteador?m=LOCAL&r=114&a=68&c=CEDIS,-98.73952937,20.03334961;TIENDA1,-98.73952937,20.03334961

Tambien se puede escificar el parametro f, que especifica que la ruta termina en ese punto. "$) End Sub