Skip to content
Snippets Groups Projects
Commit 44a554b8 authored by Olabarrieta Palacios, Ignacio's avatar Olabarrieta Palacios, Ignacio
Browse files

a

parent 259ecd87
No related branches found
No related tags found
No related merge requests found
...@@ -87,14 +87,14 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -87,14 +87,14 @@ export class BikeTrajectoryComponent implements OnInit {
this.viz_type = i; this.viz_type = i;
} }
} }
console.log("radio_change::: viz_type="+this.viz_type); console.log("radio_change::: viz_type="+this.viz_type+" markers.length="+Object.keys(this.markers).length);
if ( this.viz_type == 0 ){ if ( this.viz_type == 0 ){
this.print_pnts(); if ( Object.keys(this.markers).length == 0 ){ this.print_pnts(); }
this.get_day0(); this.get_day0();
document.getElementById('controls_env').style.display='block' document.getElementById('controls_env').style.display='block'
document.getElementById('safe_env').style.display='none'; document.getElementById('safe_env').style.display='none';
}else if ( this.viz_type == 1){ }else if ( this.viz_type == 1){
this.print_pnts(); if ( Object.keys(this.markers).length == 0 ){ this.print_pnts(); }
this.get_vels0(); this.get_vels0();
document.getElementById('controls_env').style.display='block'; document.getElementById('controls_env').style.display='block';
document.getElementById('safe_env').style.display='none'; document.getElementById('safe_env').style.display='none';
...@@ -122,6 +122,7 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -122,6 +122,7 @@ export class BikeTrajectoryComponent implements OnInit {
for( let m in this.markers){ for( let m in this.markers){
this.map.removeLayer(this.markers[m]); this.map.removeLayer(this.markers[m]);
} }
this.markers = {};
try{ try{
this.map.removeLayer(this.links); this.map.removeLayer(this.links);
}catch(e){ }catch(e){
...@@ -557,8 +558,6 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -557,8 +558,6 @@ export class BikeTrajectoryComponent implements OnInit {
div.style.width = '150px'; div.style.width = '150px';
div.style.height = '260px'; div.style.height = '260px';
let labels = []; let labels = [];
if ( clr_idx == 0 ){ if ( clr_idx == 0 ){
let minVal = 5.0; let minVal = 5.0;
let vv = minVal.toFixed(1) + ' - ' + BikeTrajectoryComponent.qs[0].toFixed(1); let vv = minVal.toFixed(1) + ' - ' + BikeTrajectoryComponent.qs[0].toFixed(1);
...@@ -570,11 +569,9 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -570,11 +569,9 @@ export class BikeTrajectoryComponent implements OnInit {
div.innerHTML += div.innerHTML +=
labels.push('<div style="width:25px;height:14px;padding-left:10px;white-space:nowrap;"><div style="width:25px;height:23px;background:' + 'white' + '"></div><label style="position:absolute;left:45px;top:' + 5 + 'px">' + vv + '</label></div>'); labels.push('<div style="width:25px;height:14px;padding-left:10px;white-space:nowrap;"><div style="width:25px;height:23px;background:' + 'white' + '"></div><label style="position:absolute;left:45px;top:' + 5 + 'px">' + vv + '</label></div>');
} }
for (let i = 0; i < BikeTrajectoryComponent.qs.length-1; i++) { for (let i = 0; i < BikeTrajectoryComponent.qs.length-1; i++) {
let vv = BikeTrajectoryComponent.qs[i]; let vv = BikeTrajectoryComponent.qs[i];
console.log('create_legend::: i='+i+' vv='+vv.toFixed(1)); //console.log('create_legend::: i='+i+' vv='+vv.toFixed(1));
if (vv < 0) { vv = 0; } if (vv < 0) { vv = 0; }
if (i < BikeTrajectoryComponent.qs.length - 1) { if (i < BikeTrajectoryComponent.qs.length - 1) {
if (BikeTrajectoryComponent.qs[i + 1] > 0) { if (BikeTrajectoryComponent.qs[i + 1] > 0) {
...@@ -611,13 +608,13 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -611,13 +608,13 @@ export class BikeTrajectoryComponent implements OnInit {
div.style.height = '260px'; div.style.height = '260px';
let labels = []; let labels = [];
let minVal = 5.0; let minVal = 5.0;
console.log('create_legend2::: vals_L='+BikeTrajectoryComponent.vals_L); //console.log('create_legend2::: vals_L='+BikeTrajectoryComponent.vals_L);
let vv = " None" let vv = " None"
div.innerHTML += div.innerHTML +=
labels.push('<div style="width:25px;height:14px;padding-left:10px;padding-top:12px;white-space:nowrap;"><div style="width:25px;height:3px;background:' + 'black' + '"></div><label style="position:absolute;left:45px;top:' + 5 + 'px">' + vv + '</label></div>'); labels.push('<div style="width:25px;height:14px;padding-left:10px;padding-top:12px;white-space:nowrap;"><div style="width:25px;height:3px;background:' + 'black' + '"></div><label style="position:absolute;left:45px;top:' + 5 + 'px">' + vv + '</label></div>');
for (let i = 0; i < BikeTrajectoryComponent.vals_L.length-1; i++) { for (let i = 0; i < BikeTrajectoryComponent.vals_L.length-1; i++) {
let vv = BikeTrajectoryComponent.vals_L[i]; let vv = BikeTrajectoryComponent.vals_L[i];
console.log('create_legend2::: i='+i+' vv='+vv);//.toFixed(1)); //console.log('create_legend2::: i='+i+' vv='+vv);//.toFixed(1));
if (vv < 0) { vv = 0; } if (vv < 0) { vv = 0; }
if (i < BikeTrajectoryComponent.vals_L.length - 1) { if (i < BikeTrajectoryComponent.vals_L.length - 1) {
if (BikeTrajectoryComponent.vals_L[i + 1] > 0) { if (BikeTrajectoryComponent.vals_L[i + 1] > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment