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
e1e70c4a
Commit
e1e70c4a
authored
May 16, 2019
by
Sergio Adrian Gongora Euan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to style in maps
parent
21cd2d18
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
121 deletions
+43
-121
control-map.css
reports/static/reports/css/control-map.css
+7
-28
minimap.js
reports/static/reports/js/minimap.js
+0
-90
sclData.html
reports/templates/sclData.html
+36
-3
No files found.
reports/static/reports/css/control-map.css
View file @
e1e70c4a
.mapControl
{
.mapControl
{
width
:
auto
;
width
:
33%
;
height
:
auto
;
height
:
auto
;
position
:
absolute
;
position
:
absolute
;
right
:
0
;
right
:
15px
;
top
:
14em
;
bottom
:
0px
;
z-index
:
2
;
z-index
:
10
;
}
}
.controlContainer
{
.controlContainer
{
width
:
auto
;
width
:
auto
;
overflow-y
:
scroll
;
max-height
:
60vh
;
max-height
:
60vh
;
border-radius
:
8px
;
border-radius
:
8px
;
padding
:
3px
;
padding
:
3px
;
padding-right
:
5px
;
padding-right
:
5px
;
}
}
.controlContainer
::-webkit-scrollbar
{
background-color
:
#ffffff
;
border-radius
:
20px
;
width
:
10px
;
}
.controlContainer
::-webkit-scrollbar-track
{
border-radius
:
20px
;
}
.controlContainer
::-webkit-scrollbar-thumb
{
background-color
:
#A6A6A6
;
border
:
2px
solid
#ffffff
;
border-radius
:
10px
;
}
.baseMap
{
.baseMap
{
height
:
158
px
;
height
:
61
px
;
width
:
296
px
;
width
:
78
px
;
padding
:
3px
;
padding
:
3px
;
cursor
:
pointer
;
cursor
:
pointer
;
background-color
:
white
;
background-color
:
white
;
...
@@ -61,9 +44,5 @@
...
@@ -61,9 +44,5 @@
padding
:
4px
;
padding
:
4px
;
background-color
:
rgba
(
0
,
0
,
0
,
0.7
);
background-color
:
rgba
(
0
,
0
,
0
,
0.7
);
color
:
white
;
color
:
white
;
font-size
:
12px
;
}
}
#mapId
{
width
:
500px
;
height
:
500px
;
}
\ No newline at end of file
reports/static/reports/js/minimap.js
View file @
e1e70c4a
...
@@ -24,20 +24,6 @@ const streets = new ol.layer.Tile({
...
@@ -24,20 +24,6 @@ const streets = new ol.layer.Tile({
})
})
});
});
const
cycle
=
new
ol
.
layer
.
Tile
({
name
:
'mapbox'
,
source
:
new
ol
.
source
.
XYZ
({
url
:
'https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=6ca0387fb7d64c68b9af3a636f384d53'
})
});
const
traffic
=
new
ol
.
layer
.
Tile
({
name
:
'mapbox'
,
source
:
new
ol
.
source
.
XYZ
({
url
:
'https://api.mapbox.com/styles/v1/mapbox/traffic-day-v2/tiles/256/{z}/{x}/{y}?access_token='
+
MAPBOX_ACCESS_TOKEN
})
});
const
night
=
new
ol
.
layer
.
Tile
({
const
night
=
new
ol
.
layer
.
Tile
({
name
:
'mapbox'
,
name
:
'mapbox'
,
source
:
new
ol
.
source
.
XYZ
({
source
:
new
ol
.
source
.
XYZ
({
...
@@ -45,12 +31,6 @@ const night = new ol.layer.Tile({
...
@@ -45,12 +31,6 @@ const night = new ol.layer.Tile({
})
})
});
});
const
satellite
=
new
ol
.
layer
.
Tile
({
name
:
'mapbox'
,
source
:
new
ol
.
source
.
XYZ
({
url
:
'https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v10/tiles/256/{z}/{x}/{y}?access_token='
+
MAPBOX_ACCESS_TOKEN
})
});
const
polygonLayer
=
new
ol
.
layer
.
Vector
({
const
polygonLayer
=
new
ol
.
layer
.
Vector
({
name
:
'polygon'
,
name
:
'polygon'
,
...
@@ -288,64 +268,6 @@ function setCompareDirection(direction){
...
@@ -288,64 +268,6 @@ function setCompareDirection(direction){
/************************* Functions de layer Sources ******************************/
/************************* Functions de layer Sources ******************************/
let
currentMap
=
light
;
let
currentMap
=
light
;
function
initControlMap
(){
let
baseMaps
=
{
"light"
:
{
layer
:
light
,
name
:
"Claro"
,
imgURL
:
"../../static/images/light.png"
,
active
:
true
},
"streets"
:
{
layer
:
streets
,
name
:
"Calles"
,
imgURL
:
"../../static/images/Streets.png"
,
active
:
true
},
"cycle"
:
{
layer
:
cycle
,
name
:
"Rutas"
,
imgURL
:
"../../static/images/cycle.png"
,
active
:
false
},
"traffic"
:
{
layer
:
traffic
,
name
:
"Trafico"
,
imgURL
:
"../../static/images/traffic.png"
,
active
:
false
},
"night"
:
{
layer
:
night
,
name
:
"Oscuro"
,
imgURL
:
"../../static/images/night.png"
,
active
:
false
},
"satellite"
:
{
layer
:
satellite
,
name
:
"Satelital"
,
imgURL
:
"../../static/images/satellite.png"
,
active
:
false
}
};
let
controlMap
=
$
(
'#controlMap'
);
for
(
let
map
in
baseMaps
)
{
let
htmlString
=
''
;
htmlString
=
'<div class="baseMap" onclick="changeMap(
\'
'
+
map
+
'
\'
)">'
;
htmlString
+=
'<img src="'
+
baseMaps
[
map
].
imgURL
+
'" width="100%" height="100%"/>'
;
htmlString
+=
'<span class="mapSelector">'
;
if
(
map
===
'light'
)
{
htmlString
+=
'<input id="'
+
map
+
'" type="radio" name="layerOption" checked><span>'
+
baseMaps
[
map
].
name
+
'</span>'
;
}
else
{
htmlString
+=
'<input id="'
+
map
+
'" type="radio" name="layerOption"><span>'
+
baseMaps
[
map
].
name
+
'</span>'
;
}
htmlString
+=
'</span>'
;
htmlString
+=
'</div>'
;
controlMap
.
append
(
htmlString
);
}
}
initControlMap
();
function
changeMap
(
selectedMap
)
{
function
changeMap
(
selectedMap
)
{
map
.
getLayers
().
getArray
().
forEach
(
function
(
layer
)
{
map
.
getLayers
().
getArray
().
forEach
(
function
(
layer
)
{
...
@@ -363,22 +285,10 @@ function changeMap(selectedMap) {
...
@@ -363,22 +285,10 @@ function changeMap(selectedMap) {
map
.
getLayers
().
insertAt
(
0
,
streets
);
map
.
getLayers
().
insertAt
(
0
,
streets
);
currentMap
=
streets
;
currentMap
=
streets
;
break
;
break
;
case
'cycle'
:
map
.
getLayers
().
insertAt
(
0
,
cycle
);
currentMap
=
cycle
;
break
;
case
'traffic'
:
map
.
getLayers
().
insertAt
(
0
,
traffic
);
currentMap
=
traffic
;
break
;
case
'night'
:
case
'night'
:
map
.
getLayers
().
insertAt
(
0
,
night
);
map
.
getLayers
().
insertAt
(
0
,
night
);
currentMap
=
night
;
currentMap
=
night
;
break
;
break
;
case
'satellite'
:
map
.
getLayers
().
insertAt
(
0
,
satellite
);
currentMap
=
satellite
;
break
;
}
}
}
}
...
...
reports/templates/sclData.html
View file @
e1e70c4a
...
@@ -155,12 +155,45 @@
...
@@ -155,12 +155,45 @@
</select>
</select>
</div>
</div>
</div>
</div>
<div
class=
"mapControl"
style=
"display: none"
>
<div
class=
"mapControl"
style=
""
>
<div
id=
"controlMap"
class=
"controlContainer"
>
<div
class=
"row"
>
<div
class=
"col-lg-4"
>
<div
class=
"baseMap"
onclick=
"changeMap('light')"
>
<img
src=
"../../static/images/light.png"
width=
"100%"
height=
"100%"
>
<span
class=
"mapSelector"
>
<input
id=
"light"
type=
"radio"
name=
"layerOption"
checked=
""
>
<span>
Noon
</span>
</span>
</div>
</div>
<div
class=
"col-lg-4"
>
<div
class=
"baseMap"
onclick=
"changeMap('streets')"
>
<img
src=
"../../static/images/Streets.png"
width=
"100%"
height=
"100%"
>
<span
class=
"mapSelector"
>
<input
id=
"streets"
type=
"radio"
name=
"layerOption"
>
<span>
Streets
</span>
</span>
</div>
</div>
<div
class=
"col-lg-4"
>
<div
class=
"baseMap"
onclick=
"changeMap('night')"
>
<img
src=
"../../static/images/night.png"
width=
"100%"
height=
"100%"
>
<span
class=
"mapSelector"
>
<input
id=
"night"
type=
"radio"
name=
"layerOption"
>
<span>
Night
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"reportPage"
class=
"wrapper"
style=
"background-color: #ecf0f5"
>
<div
id=
"reportPage"
class=
"wrapper"
style=
"background-color: #ecf0f5"
>
<div
id=
"minimap"
class=
"minimap"
></div>
<div
id=
"minimap"
class=
"minimap"
></div>
<div
class=
"mapControl"
style=
"display: none"
>
<div
id=
"controlMap"
class=
"controlContainer"
></div>
</div>
<section
class=
"content"
>
<section
class=
"content"
>
<div
class=
"row col-lg-11 title"
>
<div
class=
"row col-lg-11 title"
>
...
...
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