protected void ShowViaje(Intercalado viaje, int selectedId) { var color = GetColor(viaje.Id); var line = new Line("v" + viaje.Id, StyleFactory.GetLineFromColor(color, 4, 0.5)); var distri = DAOFactory.ViajeDistribucionDAO.FindById(viaje.Id); // Agrego los markers de las entregas var ordenEntrega = 1; foreach (var entrega in distri.Detalles) { var imageUrl = GetImageUrl(color, ordenEntrega++); AddMarker(entrega, imageUrl); } // Agrego las lineas de recorrido var recorrido = viaje.Id == selectedId ? viaje.ViajeIntercalado : viaje.ViajeAnterior; if (recorrido != null) { var stepCount = 0; var steps = recorrido.Legs.SelectMany(l => l.Steps); var puntos = steps.SelectMany(s => s.Points) .Select(p => new Point((stepCount++).ToString("0"), p.Longitud, p.Latitud)); line.AddPoints(puntos); Monitor1.AddGeometries(LayerRecorrido, line); } }