Skip to content

Commit 95b5b22

Browse files
committed
added map ( craft pos, home pos, flight trail)
1 parent b5657e4 commit 95b5b22

File tree

10 files changed

+5038
-5
lines changed

10 files changed

+5038
-5
lines changed

css/main.css

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ html.has-log .log-graph-config {
491491

492492
#craftCanvas,
493493
#analyserCanvas,
494+
#mapContainer,
494495
#stickCanvas {
495496
position:absolute;
496497
top:0;
@@ -499,8 +500,20 @@ html.has-log .log-graph-config {
499500
display:none;
500501
}
501502

503+
/* FIXME this should not be necessary when resizing is implemented */
504+
#mapContainer {
505+
z-index: 100;
506+
bottom:0 !important;
507+
display:none;
508+
height: 300px;
509+
width: 500px;
510+
}
511+
512+
513+
502514
html.has-craft #craftCanvas,
503515
html.has-analyser #analyserCanvas,
516+
html.has-map #mapContainer,
504517
html.has-sticks #stickCanvas {
505518
display:block;
506519
}
@@ -513,6 +526,19 @@ html.has-analyser-fullscreen.has-analyser .analyser input:not(.onlyFullScreenExc
513526
z-index: 10;
514527
}
515528

529+
/* This filters change the color of a black png image. For new colors check: https://codepen.io/sosuke/pen/Pjoqqp */
530+
.isBF #mapContainer .icon {
531+
filter: invert(36%) sepia(28%) saturate(3957%) hue-rotate(28deg) brightness(93%) contrast(103%);
532+
}
533+
534+
.isCF #mapContainer .icon {
535+
filter: invert(28%) sepia(100%) saturate(2050%) hue-rotate(134deg) brightness(100%) contrast(104%);
536+
}
537+
538+
.isINAV #mapContainer .icon {
539+
filter: invert(14%) sepia(100%) saturate(4698%) hue-rotate(244deg) brightness(64%) contrast(130%);
540+
}
541+
516542
.analyser:hover .non-shift #analyserResize {
517543
opacity: 1;
518544
height: auto;
@@ -606,7 +632,7 @@ html.has-analyser-fullscreen.has-analyser .analyser input:not(.onlyFullScreenExc
606632
position: absolute;
607633
}
608634

609-
.analyser {
635+
.analyser, .map-container {
610636
position: absolute;
611637
}
612638

@@ -774,6 +800,7 @@ html .view-analyser-fullscreen {
774800

775801
html.has-analyser-sticks.isBF .view-analyser-sticks,
776802
html.has-analyser.isBF .view-analyser,
803+
html.has-map.isBF .view-map,
777804
html.has-table.isBF .view-table,
778805
html.has-sticks.isBF .view-sticks,
779806
html.has-craft.isBF .view-craft,
@@ -783,6 +810,7 @@ html:not(.video-hidden).isBF .view-video {
783810

784811
html.has-analyser-sticks.isCF .view-analyser-sticks,
785812
html.has-analyser.isCF .view-analyser,
813+
html.has-map.isCF .view-map,
786814
html.has-table.isCF .view-table,
787815
html.has-sticks.isCF .view-sticks,
788816
html.has-craft.isCF .view-craft,
@@ -792,6 +820,7 @@ html:not(.video-hidden).isCF .view-video {
792820

793821
html.has-analyser-sticks.isINAV .view-analyser-sticks,
794822
html.has-analyser.isINAV .view-analyser,
823+
html.has-map.isINAV .view-map,
795824
html.has-table.isINAV .view-table,
796825
html.has-sticks.isINAV .view-sticks,
797826
html.has-craft.isINAV .view-craft,

images/markers/craft.png

10.5 KB
Loading

images/markers/home.png

11.7 KB
Loading

index.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@
1616
<link rel="stylesheet" href="css/header_dialog.css">
1717
<link rel="stylesheet" href="css/keys_dialog.css">
1818
<link rel="stylesheet" href="css/user_settings_dialog.css">
19+
<link rel="stylesheet" href="node_modules/leaflet/dist/leaflet.css">
1920

2021
<script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
22+
<script src="node_modules/leaflet/dist/leaflet.js"></script>
23+
<script src="node_modules/leaflet-marker-rotation/src/rotatedMarker.js" type="module"></script>
24+
2125
</head>
2226

2327
<body>
@@ -252,6 +256,11 @@ <h4>View</h4>
252256
<span class="pull-right">A</span>
253257
</a>
254258
</li>
259+
<li>
260+
<a href="#" id="auto-hide-menu" class="view-map auto-hide-menu" data-toggle="tooltip" title="View/hide map">
261+
<span class="glyphicon glyphicon-map-marker"></span> Map
262+
</a>
263+
</li>
255264
</ul>
256265
</div>
257266
<div class="btn-group view-buttons-expanded" role="group">
@@ -285,6 +294,9 @@ <h4>Overlay</h4>
285294
<button type="button" class="btn btn-default view-analyser" data-toggle="tooltip" title="View/hide analyser display">
286295
<span class="glyphicon glyphicon-equalizer"></span>
287296
</button>
297+
<button type="button" class="btn btn-default view-map" data-toggle="tooltip" title="View/hide map">
298+
<span class="glyphicon glyphicon-map-marker"></span>
299+
</button>
288300
</div>
289301
</div>
290302
</li>
@@ -490,6 +502,7 @@ <h4>Workspace</h4>
490502
<option>100</option>
491503
</datalist>
492504
</div>
505+
<div id="mapContainer" class="map-container"></div>
493506
<canvas width="0" height="0" id="stickCanvas"></canvas>
494507
<span class="log-open-legend-dialog glyphicon glyphicon-cog" data-toggle="tooltip" title="Show the legend"></span>
495508
</div>
@@ -2893,6 +2906,35 @@ <h4 class="modal-title">Advanced User Settings</h4>
28932906
</table>
28942907
</div>
28952908
</div>
2909+
<div class="gui_box grey top-spacer map-settings">
2910+
<div class="gui_box_titlebar">
2911+
<div class="spacer_box_title">Map Settings</div>
2912+
</div>
2913+
<div class="spacer_box">
2914+
<table>
2915+
<tr>
2916+
<td>
2917+
<label>Position</label>
2918+
</td>
2919+
<td class="position">
2920+
<label>Top</label>
2921+
<input name="map-top" type="number" step="1" min="0" max="100" />
2922+
<p>%</p>
2923+
</td>
2924+
<td class="position">
2925+
<label>Left</label>
2926+
<input name="map-left" type="number" step="1" min="0" max="100" />
2927+
<p>%</p>
2928+
</td>
2929+
<td class="position">
2930+
<label>Size</label>
2931+
<input name="map-size" type="number" step="1" min="0" max="100" />
2932+
<p>%</p>
2933+
</td>
2934+
</tr>
2935+
</table>
2936+
</div>
2937+
</div>
28962938
<div class="gui_box grey top-spacer watermark-settings">
28972939
<div class="gui_box_titlebar">
28982940
<div class="spacer_box_title">Watermark Settings</div>
@@ -3112,6 +3154,7 @@ <h4 class="modal-title">Advanced User Settings</h4>
31123154
<script src="js/configuration.js"></script>
31133155
<script src="js/laptimer.js"></script>
31143156
<script src="js/localization.js"></script>
3157+
<script src="js/graph_map.js"></script>
31153158
<script src="js/main.js"></script>
31163159
<script src="index.js"></script>
31173160

0 commit comments

Comments
 (0)