GPS. metodo para obtener rutas en webs service
This commit is contained in:
@@ -1150,6 +1150,44 @@ Public Class WSGPSApp
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
<WebMethod>
|
||||
Public Function GetGeoRutas(CveCliente As Integer, CveDispositivo As Integer) As String
|
||||
Dim CveGeoReferencia As Integer = -1
|
||||
Dim DtRutas As DataTable = Nothing
|
||||
Using ObjGPS As New ClsGPS
|
||||
If ObjGPS.GetReferenciaDetalle(-1, -1, CveDispositivo, CveCliente) Then
|
||||
CveGeoReferencia = ObjGPS.DtResultados.FiltroPrimeroValor("CveGeoReferencia", "Tipo = 'Ruta'").ToEntero()
|
||||
End If
|
||||
If CveGeoReferencia > 0 Then
|
||||
If ObjGPS.GeoReferenciaGet(CveGeoReferencia, -1, "Ruta", CveCliente) Then
|
||||
DtRutas = ObjGPS.DtResultados.Copy()
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
Dim Rutas As New List(Of Object)
|
||||
If CveGeoReferencia > 0 Then
|
||||
|
||||
For Each Row As DataRow In DtRutas.Rows
|
||||
Dim Coordenadas As List(Of MWSGeolocation2) = SQLToGmapsPolyline(Row("Coordenadas").ToString())
|
||||
|
||||
Rutas.Add(New With {
|
||||
.CveRuta = CveGeoReferencia,
|
||||
.Ruta = Row("GeoReferencia").ToString(),
|
||||
.Folio = "",
|
||||
.Fecha = Row("FechaInicio").ToString(),
|
||||
.CveDispositivo = CveDispositivo,
|
||||
.CveUsuarioIngreso = -1,
|
||||
.Coordenadas = Coordenadas
|
||||
})
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Return JsonConvert.SerializeObject(Rutas)
|
||||
|
||||
End Function
|
||||
<WebMethod>
|
||||
Public Function GetRutas(CveCliente As Integer, CveRuta As Integer, MostrarPuntos As Boolean) As String
|
||||
Dim DtRutas As DataTable = Nothing
|
||||
|
||||
Reference in New Issue
Block a user