change map style, line opacity and zoom

This commit is contained in:
unknown 2020-12-31 15:51:19 +01:00
parent 39efd32509
commit 8c18b2d3f5
3 changed files with 7 additions and 7 deletions

View File

@ -1,7 +1,7 @@
mapboxgl.accessToken = 'pk.eyJ1IjoiZmhlcmtvbW0iLCJhIjoiY2tobm81bXppMGVuNzMyazY3eDU0M2dyaSJ9.qWJrwtv7KitW60pzs6h3Gg';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
style: 'mapbox://styles/mapbox/satellite-v9',
zoom: 0
});
var emptyTCP = {
@ -42,7 +42,7 @@ map.on('load', function () {
},
'paint': {
'line-color': 'rgba(30, 139, 195, 1)',
'line-opacity': 0.75,
'line-opacity': 1,
'line-width': 5
}
});
@ -56,13 +56,13 @@ map.on('load', function () {
},
'paint': {
'line-color': 'rgba(214, 69, 65, 1)',
'line-opacity': 0.75,
'line-opacity': 1,
'line-width': 5
}
});
map.jumpTo({ 'center': [9.19640999, 49.12283027], 'zoom': 17 });
map.jumpTo({ 'center': [9.19640999, 49.12283027], 'zoom': 16 });
map.setPitch(30);
var stateLegendEl = document.getElementById('state-legend');

View File

@ -4,7 +4,7 @@ var options1 = {
datasets: [
{
label: 'speedTCP',
data: [50,50],
data: [0,100],
backgroundColor: [
'rgba(30, 139, 195, 1)',
'rgba(191, 191, 191, 1)'
@ -17,7 +17,7 @@ var options1 = {
},
{
label: 'speedSERIAl',
data: [50, 50],
data: [0, 100],
backgroundColor: [
'rgba(214, 69, 65, 1)',
'rgba(191, 191, 191, 1)'

View File

@ -37,7 +37,7 @@ window.addEventListener("load", function(evt) {
addSpeedTcp(dat.SOURCE_TCP.Speed);
}
if(!(dat.SOURCE_TCP.HeadDevice === 0)){
document.getElementById("compassTCP").innerHTML = "Smartphone: " + dat.SOURCE_TCP.HeadDevice.toFixed(0) + "°"
document.getElementById("compassTCP").innerHTML = "Smartphone: <br>" + dat.SOURCE_TCP.HeadDevice.toFixed(0) + "°"
document.getElementById("needleTCP").style.transform = `rotate(${dat.SOURCE_TCP.HeadDevice}deg)`
}
}