Commit bed78b9e authored by Ulises Morales Ramírez's avatar Ulises Morales Ramírez
parents 4184af88 8259750b
......@@ -10,6 +10,10 @@ var playImages;
var reportImg = activePoints[0];
//var myChart;
var SCLlayers = []
config.data.datasets.forEach(function (layer) {
SCLlayers.push(layer.label.toLowerCase().replace(/\s/g, '_'));
});
// mostrar imagen al dar click en los puntos
document.getElementById("myChart").onclick = function (evt) {
......@@ -29,7 +33,7 @@ document.getElementById("myChart").onclick = function (evt) {
//console.log(firstPoint)
//console.log(firstPoint._datasetIndex) //indice de la clase a la que pertenece (vegetación, agua, etc.)
var label = myChart.data.labels[firstPoint._index];
addImageLayer(label)
//addImageLayer(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.)
......@@ -130,17 +134,11 @@ function updateImage(imagePoint) {
document.getElementById("satImage").src = "../../static/reports/tmpImages/repsat_test_dev/" + image_path + label + "_TCI_60m.jpg"
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"
SCLlayers.forEach(function (layer) {
if (layer != "no_data") {
document.getElementById("scl_" + layer).src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_" + layer + ".png"
}
})
//document.getElementById("scl_vegetation").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_vegetation.png"
}
......
......@@ -139,7 +139,7 @@
<h4>End date: {{ endDate }}</h4>
</div>
<div class="col-lg-2 text-center">
<h4>Clouds: {{ clouds }}</h4>
<h4>Clouds: {{ clouds }} %</h4>
</div>
</div>
</div>
......@@ -219,7 +219,7 @@
<div class="row img-comp-container">
<div class="col-lg-3 col-md-2 col-xs-2 listImg">
<label>Image 1</label>
<div class="list">
<div class ="list" style="margin-bottom: 20px">
<ul id="imageListFirst">
{% for label in labels %}
{% if label == labels.0 %}
......@@ -295,7 +295,7 @@
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_not-vegetated.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_water"
width="400px"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_water.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_unclassified"
......@@ -303,7 +303,7 @@
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_unclassified.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_cloud_medium_probability"
width="400px"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_cloud_medium_probability.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_cloud_high_probability"
......@@ -423,10 +423,12 @@
if(meta.hidden){
console.log("Mostrar!!!")
SCLlayers.push(layer)
document.getElementById("scl_"+layer).src = "../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}"+label+"_SCL_60m_"+layer+".png"
}
else{
console.log("Ocultar!!")
SCLlayers.splice(SCLlayers.indexOf(layer), 1);
document.getElementById("scl_"+layer).src = ""
}
//if (index > 1) {
......
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