Commit 3a5dd250 authored by Ulises Morales Ramírez's avatar Ulises Morales Ramírez
parents 0fcf10a9 3bccdc79
......@@ -24,13 +24,14 @@ document.getElementById("myChart").onclick = function (evt) {
console.log(activePoint)
console.log(activePoint.length)
if(activePoint.length>0){
console.log("asd")
var firstPoint = activePoint[0];
//console.log(firstPoint)
//console.log(firstPoint._datasetIndex) //la clase a la que pertenece (vegetación, agua, etc.)
//console.log(firstPoint._datasetIndex) //indice de la clase a la que pertenece (vegetación, agua, etc.)
var label = myChart.data.labels[firstPoint._index];
//console.log(label)
console.log("label: ")
console.log(label)
//console.log(myChart.legend.legendItems[firstPoint._datasetIndex].text) //nombre de la capa a la que pertenece (vegetación, agua, etc.)
//if (!firstPoint) return;
activePoints.forEach(function (value, index) {
//if(value==firstPoint){
......@@ -120,7 +121,20 @@ function updateImage(imagePoint) {
titleLabel = label.slice(0, 4) + "/" + label.slice(4, 6) + "/" + label.slice(6);
document.getElementById("titleMap").innerHTML = titleLabel;
document.getElementById("satImage").src = "../../static/reports/tmpImages/repsat_test_dev/" + image_path + label + "_TCI_60m.jpg"
document.getElementById("scl_Vegetation").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_vegetation.png"
document.getElementById("scl_saturated").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_saturated.png"
document.getElementById("scl_shadows").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_shadows.png"
document.getElementById("scl_cloud_shadows").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_cloud_shadows.png"
document.getElementById("scl_vegetation").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_vegetation.png"
document.getElementById("scl_not-vegetated").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_not-vegetated.png"
document.getElementById("scl_water").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_water.png"
document.getElementById("scl_unclassified").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_unclassified.png"
document.getElementById("scl_cloud_medium_probability").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_cloud_medium_probability.png"
document.getElementById("scl_cloud_high_probability").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_cloud_high_probability.png"
document.getElementById("scl_thin_cirrus").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_thin_cirrus.png"
document.getElementById("scl_snow").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_snow.png"
//document.getElementById("scl_vegetation").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_vegetation.png"
}
function change(newType) {
......
......@@ -218,25 +218,12 @@
<!-- ************************ SCL **********************-->
<div class="box box-danger">
<div class="box-header with-border">
<!-- <div class="pull-left">
<button type="button" id="play" class="btn btn-block btn-primary btn-xs" style=""
onclick="play()">
<i class="fa fa-play"></i> Play
</button>
<button type="button" id="stop" class="btn btn-block btn-primary btn-xs"
style="display: none; margin: 0px;" onclick="stop()">
<i class="fa fa-stop"></i> Stop
</button>
</div> -->
<!-- <h3 class="box-title" id="titleMap">{{dafaultLabel}} - {{defaultDataSet}}</h3> -->
<h3 class="box-title" id="titleMap">Scene Classification Map - {{ defaultDataSet }}</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i
class="fa fa-minus"></i>
</button>
<!-- <button type="button" class="btn btn-box-tool" data-widget="remove" onclick="stop()"><i
class="fa fa-times"></i></button> -->
</div>
</div>
<div class="box-body">
......@@ -244,51 +231,51 @@
<div class="col-lg-1 col-md-1 col-xs-1 prev" style="display: none">
<i class="glyphicon glyphicon-chevron-left" onclick="prev()"></i>
</div>
<div class="col-lg-10 col-md-9 col-xs-10 col-lg-offset-1" id="showImageSCL" style="position: relative;">
<div class="col-lg-10 col-md-9 col-xs-10 col-lg-offset-1" id="showImageSCL" style="position: relative; height: 580px;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_saturated"
width="400px"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_saturated.png"
style="position: absolute; left: 0; top: 0; z-index:1;">
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_shadows"
width="400px"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_shadows.png"
style="position: absolute; left: 0; top: 0; z-index:1;">
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_cloud_shadows"
width="400px"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_cloud_shadows.png"
style="position: absolute; left: 0; top: 0; z-index:1;">
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_vegetation"
width="400px"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_vegetation.png"
style="position: absolute; left: 0; top: 0; z-index:1;">
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_not-vegetated"
width="400px"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_not-vegetated.png"
style="position: absolute; left: 0; top: 0; z-index:1;">
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_water"
width="400px"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_water.png"
style="position: absolute; left: 0; top: 0; z-index:1;">
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_unclassified"
width="400px"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_unclassified.png"
style="position: absolute; left: 0; top: 0; z-index:1;">
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_cloud_medium_probability"
width="400px"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_cloud_medium_probability.png"
style="position: absolute; left: 0; top: 0; z-index:1;">
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_cloud_high_probability"
width="400px"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_scl_cloud_high_probability.png"
style="position: absolute; left: 0; top: 0; z-index:1;">
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_cloud_high_probability.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_thin_cirrus"
width="400px"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_thin_cirrus.png"
style="position: absolute; left: 0; top: 0; z-index:1;">
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_snow"
width="400px"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_snow.png"
style="position: absolute; left: 0; top: 0; z-index:1;">
style="position: absolute; top: 0; z-index:1;">
</div>
<div class="col-lg-1 col-md-1 col-xs-1 next" style="display: none">
......@@ -370,12 +357,19 @@
console.log(meta.hidden)
var layer = legendItem.text.toLowerCase();
//layer = layer.replace(" ", "_");
layer = layer.replace(/\s/g,'_');
layer = layer.replace(/\s/g,'_'); //reeemplaza los espacios con guion bajo
console.log(layer)
var activePoint = ch.getElementAtEvent(e);
console.log(document.getElementById("titleMap").textContent)
var label = document.getElementById("titleMap").textContent; //obtiene la fecha que se está viendo
label = label.replace(/\//g,''); // reemplaza los diagonales por nada
console.log(label)
if(meta.hidden){
console.log("Mostrar!!!")
document.getElementById("scl_"+layer).src = "../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_"+layer+".png"
document.getElementById("scl_"+layer).src = "../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}"+label+"_SCL_60m_"+layer+".png"
}
else{
console.log("Ocultar!!")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment