Skip to content

Commit 33d4fbc

Browse files
committed
Added support for DL24ENTE
1 parent b7117d0 commit 33d4fbc

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

img/markers/balloon-ente.png

40.2 KB
Loading

img/markers/parachute-ente.png

49.9 KB
Loading

img/markers/payload-ente.png

13.6 KB
Loading

js/tracker.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2442,6 +2442,7 @@ var array_unique = function(inarr) {
24422442

24432443
function addPosition(position) {
24442444
var vcallsign = position.vehicle;
2445+
// console.log(vcallsign);
24452446

24462447
// check if the vehicle is already in the list, if not create a new item
24472448
if(!vehicles.hasOwnProperty(vcallsign)) {
@@ -2523,11 +2524,13 @@ function addPosition(position) {
25232524
});
25242525

25252526
marker.addTo(map);
2526-
} else {
2527+
}
2528+
else {
25272529
vehicle_type = "balloon";
25282530
color_index = balloon_index++ % balloon_colors.length;
25292531

2530-
image_src = host_url + markers_url + "balloon-" +
2532+
if(vcallsign == "DL24ENTE") image_src = host_url + markers_url + "balloon-ente.png";
2533+
else image_src = host_url + markers_url + "balloon-" +
25312534
((vcallsign == "PIE") ? "rpi" : balloon_colors_name[color_index]) + ".png";
25322535
image_src_size = [46,84];
25332536
image_src_offset = [-35,-46];
@@ -2574,6 +2577,7 @@ function addPosition(position) {
25742577

25752578
marker.shadow = marker_shadow;
25762579
marker.balloonColor = (vcallsign == "PIE") ? "rpi" : balloon_colors_name[color_index];
2580+
marker.balloonColor = (vcallsign == "DL24ENTE") ? "ente" : balloon_colors_name[color_index];
25772581
marker.mode = 'balloon';
25782582
marker.setMode = function(mode) {
25792583
if(this.mode == mode) return;
@@ -2587,7 +2591,14 @@ function addPosition(position) {
25872591
map.removeLayer(vehicle.horizon_circle_title);
25882592
map.removeLayer(vehicle.subhorizon_circle_title);
25892593

2594+
if(this.balloonColor == "ente")
25902595
img = new L.icon ({
2596+
iconUrl: host_url + markers_url + "payload-" + this.balloonColor + ".png",
2597+
iconSize: [48,70],
2598+
iconAnchor: [24,70],
2599+
tooltipAnchor: [0,-20],
2600+
});
2601+
else img = new L.icon ({
25912602
iconUrl: host_url + markers_url + "payload-" + this.balloonColor + ".png",
25922603
iconSize: [17,18],
25932604
iconAnchor: [8,14],
@@ -2603,6 +2614,8 @@ function addPosition(position) {
26032614
map.addLayer(vehicle.subhorizon_circle_title);
26042615
}
26052616

2617+
// mode = "parachute";
2618+
26062619
if(mode == "parachute") {
26072620
img = new L.icon ({
26082621
iconUrl: host_url + markers_url + "parachute-" + this.balloonColor + ".png",

0 commit comments

Comments
 (0)