Commit 105f391c authored by Luis Dominguez's avatar Luis Dominguez

new map in the selector maps from the reports section

parent 52c8e359
.mapControl{ .mapControl{
width: 33%; width: 36%;
height: auto; height: auto;
position: absolute; position: absolute;
right: 15px; right: 15px;
......
...@@ -31,6 +31,13 @@ const night = new ol.layer.Tile({ ...@@ -31,6 +31,13 @@ const night = new ol.layer.Tile({
}) })
}); });
const cycle = new ol.layer.Tile({
name: 'mapbox',
source: new ol.source.XYZ({
url: 'https://api.tiles.mapbox.com/v4/mapbox.outdoors/{z}/{x}/{y}.png?access_token=' + MAPBOX_ACCESS_TOKEN
}),
});
const polygonLayer = new ol.layer.Vector({ const polygonLayer = new ol.layer.Vector({
name: 'polygon', name: 'polygon',
...@@ -299,6 +306,10 @@ function changeMap(selectedMap) { ...@@ -299,6 +306,10 @@ function changeMap(selectedMap) {
map.getLayers().insertAt(0, night); map.getLayers().insertAt(0, night);
currentMap = night; currentMap = night;
break; break;
case 'cycle':
map.getLayers().insertAt(0, cycle);
currentMap = cycle;
break;
} }
} }
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
<div class="mapControl" style=""> <div class="mapControl" style="">
<div id="controlMap" class="controlContainer"> <div id="controlMap" class="controlContainer">
<div class="row"> <div class="row">
<div class="col-lg-4"> <div class="col-lg-3">
<div class="baseMap" onclick="changeMap('light')"> <div class="baseMap" onclick="changeMap('light')">
<img src="../../static/images/light.png" width="100%" height="100%"> <img src="../../static/images/light.png" width="100%" height="100%">
<span class="mapSelector"> <span class="mapSelector">
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
</span> </span>
</div> </div>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-3">
<div class="baseMap" onclick="changeMap('streets')"> <div class="baseMap" onclick="changeMap('streets')">
<img src="../../static/images/Streets.png" width="100%" height="100%"> <img src="../../static/images/Streets.png" width="100%" height="100%">
<span class="mapSelector"> <span class="mapSelector">
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
</span> </span>
</div> </div>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-3">
<div class="baseMap" onclick="changeMap('night')"> <div class="baseMap" onclick="changeMap('night')">
<img src="../../static/images/night.png" width="100%" height="100%"> <img src="../../static/images/night.png" width="100%" height="100%">
<span class="mapSelector"> <span class="mapSelector">
...@@ -195,6 +195,15 @@ ...@@ -195,6 +195,15 @@
</span> </span>
</div> </div>
</div> </div>
<div class="col-lg-3">
<div class="baseMap" onclick="changeMap('cycle')">
<img src="../../static/images/cycle.png" width="100%" height="100%">
<span class="mapSelector">
<input id="cycle" type="radio" name="layerOption">
<span>Cycle</span>
</span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
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