Skip to content

Commit

Permalink
Refactorizado
Browse files Browse the repository at this point in the history
Signed-off-by: nestorlora <[email protected]>
  • Loading branch information
nestorlora committed Sep 2, 2018
1 parent 9869dbc commit 25f2cfa
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions assets/rutpam.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ $(document).ready(function(){
verCopyright(); // Mostramos el "Acerca de RUTPAM"
initMap(); // Inicializamos el mapa y todo el layout
document.title = "RUTPAM "+rutpam_version; // Seteamos el título del documento
getLineasEmt(); // Cargamos las líneas
});

/**
Expand All @@ -149,12 +150,6 @@ function initMap() {
return null;
}

function getLineas(){
getLineasEmt();
//getLineasCtan();
return null;
}

/**
* @description Función asíncrona para refrescar los datos periódicamente
* @returns {null}
Expand Down Expand Up @@ -714,14 +709,6 @@ function ControlRUTPAM(mapDiv){
var titulo = $("<h2>", {"text":"RUTPAM"});
var descripcion = $("<p>", {"text":"Seguimiento buses EMT en tiempo real"});
$(mapDiv).append(titulo).append(descripcion);

var obtenerLineas = $("<button>", {
"id": "getLineas",
"type": "button",
"class": "boton",
"text": "Obtener líneas"
});
obtenerLineas.on("click", getLineas);
var play = $("<button>", {
"id": "play",
"type": "button",
Expand Down Expand Up @@ -751,8 +738,9 @@ function ControlRUTPAM(mapDiv){
pause.on("click", function(){
stop();
});
var controles = $("<p>", {id: "controles"}).append(play).append(refresh).append(pause);
pause.css("display", "none");
$(mapDiv).append(obtenerLineas).append(play).append(refresh).append(pause);
$(mapDiv).append(controles);
var tabla = $("<table>", {
"id": "tablaLineas"
});
Expand Down

1 comment on commit 25f2cfa

@nestorlora
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahora la carga de las líneas se produce automáticamente sin interacción del usuario.

Please sign in to comment.