Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
547f234f
Commit
547f234f
authored
Mar 06, 2019
by
Irving David
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Añadido que cambie la imagen SCL al seleccionar un punto de la gráfica
parent
a7eda4b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
reportImg.js
reports/static/reports/js/reportImg.js
+18
-4
L2ASCL_data.html
reports/templates/L2ASCL_data.html
+9
-2
No files found.
reports/static/reports/js/reportImg.js
View file @
547f234f
...
@@ -24,13 +24,14 @@ document.getElementById("myChart").onclick = function (evt) {
...
@@ -24,13 +24,14 @@ document.getElementById("myChart").onclick = function (evt) {
console
.
log
(
activePoint
)
console
.
log
(
activePoint
)
console
.
log
(
activePoint
.
length
)
console
.
log
(
activePoint
.
length
)
if
(
activePoint
.
length
>
0
){
if
(
activePoint
.
length
>
0
){
console
.
log
(
"asd"
)
var
firstPoint
=
activePoint
[
0
];
var
firstPoint
=
activePoint
[
0
];
//console.log(firstPoint)
//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
];
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;
//if (!firstPoint) return;
activePoints
.
forEach
(
function
(
value
,
index
)
{
activePoints
.
forEach
(
function
(
value
,
index
)
{
//if(value==firstPoint){
//if(value==firstPoint){
...
@@ -120,7 +121,20 @@ function updateImage(imagePoint) {
...
@@ -120,7 +121,20 @@ function updateImage(imagePoint) {
titleLabel
=
label
.
slice
(
0
,
4
)
+
"/"
+
label
.
slice
(
4
,
6
)
+
"/"
+
label
.
slice
(
6
);
titleLabel
=
label
.
slice
(
0
,
4
)
+
"/"
+
label
.
slice
(
4
,
6
)
+
"/"
+
label
.
slice
(
6
);
document
.
getElementById
(
"titleMap"
).
innerHTML
=
titleLabel
;
document
.
getElementById
(
"titleMap"
).
innerHTML
=
titleLabel
;
document
.
getElementById
(
"satImage"
).
src
=
"../../static/reports/tmpImages/repsat_test_dev/"
+
image_path
+
label
+
"_TCI_60m.jpg"
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
)
{
function
change
(
newType
)
{
...
...
reports/templates/L2ASCL_data.html
View file @
547f234f
...
@@ -357,12 +357,19 @@
...
@@ -357,12 +357,19 @@
console
.
log
(
meta
.
hidden
)
console
.
log
(
meta
.
hidden
)
var
layer
=
legendItem
.
text
.
toLowerCase
();
var
layer
=
legendItem
.
text
.
toLowerCase
();
//layer = layer.replace(" ", "_");
//layer = layer.replace(" ", "_");
layer
=
layer
.
replace
(
/
\s
/g
,
'_'
);
layer
=
layer
.
replace
(
/
\s
/g
,
'_'
);
//reeemplaza los espacios con guion bajo
console
.
log
(
layer
)
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
){
if
(
meta
.
hidden
){
console
.
log
(
"Mostrar!!!"
)
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
{
else
{
console
.
log
(
"Ocultar!!"
)
console
.
log
(
"Ocultar!!"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment