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
8cf0e2a8
Commit
8cf0e2a8
authored
Apr 02, 2019
by
Emmanuel René Huchim Puc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete currentOpacity variable
parent
c251da4d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
minimap.js
reports/static/reports/js/minimap.js
+4
-11
No files found.
reports/static/reports/js/minimap.js
View file @
8cf0e2a8
...
@@ -38,15 +38,9 @@ const map = new ol.Map({
...
@@ -38,15 +38,9 @@ const map = new ol.Map({
map
.
getView
().
fit
(
feature
.
getGeometry
());
map
.
getView
().
fit
(
feature
.
getGeometry
());
// show first date and current date
// show first date
let
currentDate
;
let
currentDate
=
labels
[
0
];
let
currentOpacity
=
1
;
addImageLayer
(
currentDate
)
if
(
labels
&&
labels
.
length
>
0
)
{
currentDate
=
labels
[
0
];
addImageLayer
(
currentDate
)
}
function
addImageLayer
(
labelDate
)
{
function
addImageLayer
(
labelDate
)
{
$
.
ajax
({
$
.
ajax
({
...
@@ -63,7 +57,7 @@ function addImageLayer(labelDate) {
...
@@ -63,7 +57,7 @@ function addImageLayer(labelDate) {
getSelectedCheckboxes
().
forEach
(
layer_type
=>
{
getSelectedCheckboxes
().
forEach
(
layer_type
=>
{
const
xyz
=
new
ol
.
layer
.
Tile
({
const
xyz
=
new
ol
.
layer
.
Tile
({
name
:
layer_type
,
name
:
layer_type
,
opacity
:
(
layer_type
==
'TCI'
)
?
1
:
currentOpacity
,
opacity
:
(
layer_type
==
'TCI'
)
?
1
:
$
(
'#opacitySlide'
).
val
()
,
source
:
new
ol
.
source
.
XYZ
({
source
:
new
ol
.
source
.
XYZ
({
projection
:
'EPSG:3857'
,
projection
:
'EPSG:3857'
,
url
:
'/reports/tiles/'
+
purchase_id
+
'/'
+
zone
+
'/'
+
layer_type
+
'/'
+
labelDate
+
'/{z}/{x}/{-y}.png'
,
url
:
'/reports/tiles/'
+
purchase_id
+
'/'
+
zone
+
'/'
+
layer_type
+
'/'
+
labelDate
+
'/{z}/{x}/{-y}.png'
,
...
@@ -92,7 +86,6 @@ function removeImageLayers() {
...
@@ -92,7 +86,6 @@ function removeImageLayers() {
}
}
function
setOpacity
(
value
)
{
function
setOpacity
(
value
)
{
currentOpacity
=
value
;
map
.
getLayers
().
getArray
().
slice
().
forEach
(
layer
=>
{
map
.
getLayers
().
getArray
().
slice
().
forEach
(
layer
=>
{
if
(
layer
.
get
(
'name'
)
!=
'mapbox'
&&
layer
.
get
(
'name'
)
!=
'polygon'
&&
layer
.
get
(
'name'
)
!=
'TCI'
)
{
if
(
layer
.
get
(
'name'
)
!=
'mapbox'
&&
layer
.
get
(
'name'
)
!=
'polygon'
&&
layer
.
get
(
'name'
)
!=
'TCI'
)
{
layer
.
setOpacity
(
value
)
layer
.
setOpacity
(
value
)
...
...
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