Skip to content

Commit 7317a96

Browse files
for more nyan add ?nyan
1 parent a820833 commit 7317a96

File tree

3 files changed

+46
-8
lines changed

3 files changed

+46
-8
lines changed

cache.manifest

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# version 132
2+
# version 133
33

44
# gogole maps files
55
http://maps.google.com/maps/api/js?v=3.10&sensor=false&key=AIzaSyCOqkcNey4CCyG4X0X5qxHAhCgD8g5DwXg
@@ -21,6 +21,7 @@ img/logo.png
2121
img/blank.png
2222
img/marker-you.png
2323
img/apple-touch-icon.png
24+
img/markers/nyan.gif
2425
img/markers/antenna-green.png
2526
img/markers/balloon-red.png
2627
img/markers/balloon-blue.png

img/markers/nyan.gif

22 KB
Loading

js/tracker.js

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ var notamOverlay = null;
4040
// order of map elements
4141
var Z_RANGE = 1;
4242
var Z_STATION = 2;
43-
var Z_PATH = 3;
44-
var Z_SHADOW = 4;
45-
var Z_CAR = 5;
46-
var Z_PAYLOAD = 6;
43+
var Z_PATH = 10;
44+
var Z_SHADOW = 11;
45+
var Z_CAR = 12;
46+
var Z_PAYLOAD = 13;
4747

4848
// localStorage vars
4949
var ls_receivers = false;
@@ -541,7 +541,9 @@ function redrawPrediction(vehicle_index) {
541541
}
542542

543543
function updatePolyline(vehicle_index) {
544-
vehicles[vehicle_index].polyline.setPath(vehicles[vehicle_index].positions);
544+
for(k in vehicles[vehicle_index].polyline) {
545+
vehicles[vehicle_index].polyline[k].setPath(vehicles[vehicle_index].positions);
546+
}
545547
}
546548

547549
function convert_time(gps_time) {
@@ -714,15 +716,15 @@ function addPosition(position) {
714716
positions: [],
715717
curr_position: position,
716718
line: [],
717-
polyline: new google.maps.Polyline({
719+
polyline: [new google.maps.Polyline({
718720
map: map,
719721
zIndex: Z_PATH,
720722
strokeColor: balloon_colors[c],
721723
strokeOpacity: 0.8,
722724
strokeWeight: 3,
723725
clickable: false,
724726
draggable: false,
725-
}),
727+
})],
726728
prediction: null,
727729
ascent_rate: 0.0,
728730
horizontal_rate: 0.0,
@@ -743,6 +745,41 @@ function addPosition(position) {
743745
// deep copy yaxes config for graph
744746
if(plot) $.each($.extend(false, plot_options.yaxes, {}), function(k,v) { vehicle_info.graph_yaxes.push(v) });
745747

748+
// nyan mod
749+
if(window.location.search == "?nyan" && vehicle_info.vehicle_type == "balloon") {
750+
vehicle_info.marker.setMap(null);
751+
vehicle_info.marker.setMode = function(derp) {};
752+
vehicle_info.marker_shadow = new google.maps.Marker({
753+
map: map,
754+
zIndex: Z_SHADOW,
755+
optimized: false,
756+
position: point,
757+
icon: {
758+
url: host_url + markers_url + "nyan.gif",
759+
size: new google.maps.Size(55,39),
760+
scaledSize: new google.maps.Size(55,39),
761+
anchor: new google.maps.Point(26,20)
762+
},
763+
clickable: false
764+
});
765+
vehicle_info.image_src = host_url + markers_url + "nyan.gif";
766+
767+
var rainbow = ["#ff0000", "#fc9a00", "#f6ff00", "#38ff01", "#009aff","#0000ff"];
768+
769+
for(k in rainbow) {
770+
vehicle_info.polyline.push(new google.maps.Polyline({
771+
map: map,
772+
zIndex: (Z_PATH - (k * 1)),
773+
strokeColor: rainbow[k],
774+
strokeOpacity: 1,
775+
strokeWeight: (k*4) + 2,
776+
clickable: false,
777+
draggable: false,
778+
}));
779+
}
780+
}
781+
782+
746783
vehicles.push(vehicle_info);
747784
}
748785

0 commit comments

Comments
 (0)