Skip to content

Commit 3ec7bfe

Browse files
added global weather overlays from NRL
1 parent 73c03c6 commit 3ec7bfe

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

js/app.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,11 @@ $(window).ready(function() {
626626

627627
// list of overlays
628628
var overlayList = [
629+
['Global', [
630+
['nrl-global-cloudtop','NRL Monterey Cloudtop'],
631+
['nrl-global-ir','NRL Monterey IR'],
632+
['nrl-global-vapor','NRL Monterey Vapor']
633+
]],
629634
['Europe/Africa', [
630635
['meteosat-Odeg-MPE', 'METEOSAT Precip. Estimate']
631636
]],
@@ -697,16 +702,18 @@ $(window).ready(function() {
697702
e.removeClass('off').addClass('on');
698703
on = 1;
699704
}
700-
weatherMETEOSAT_MPE.setMap(null);
701-
weatherMETEOSAT_IODC_MPE.setMap(null);
705+
706+
weatherImageOverlay.setMap(null);
702707
map.overlayMapTypes.setAt("0", null);
703708

704709
if(on) {
705-
if(id == "meteosat-Odeg-MPE") {
706-
weatherMETEOSAT_MPE.setMap(map);
707-
return;
708-
} else if(id == "meteosat-iodc-MPE") {
709-
weatherMETEOSAT_IODC_MPE.setMap(map);
710+
if(id in weatherImageOverlayList) {
711+
var o = weatherImageOverlayList[id];
712+
var sw = new google.maps.LatLng(o[1][0][0], o[1][0][1]);
713+
var ne = new google.maps.LatLng(o[1][1][0], o[1][1][1]);
714+
var bounds = new google.maps.LatLngBounds(sw, ne);
715+
weatherImageOverlay = new google.maps.GroundOverlay(o[0], bounds, {opacity: 0.7});
716+
weatherImageOverlay.setMap(map);
710717
return;
711718
}
712719

js/tracker.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,15 @@ var weatherOverlay = new google.maps.ImageMapType({
5858
isPng: true
5959
});
6060

61-
var weatherMETEOSAT_MPE_image = "http://oiswww.eumetsat.int/IPPS/html/GE/MET0D/GE_MET0D_VP-MPE.png";
62-
var weatherMETEOSAT_MPE_bounds = new google.maps.LatLngBounds(new google.maps.LatLng(-57.492200, -57.492200), new google.maps.LatLng(57.492200, 57.492200));;
63-
var weatherMETEOSAT_MPE = new google.maps.GroundOverlay(weatherMETEOSAT_MPE_image, weatherMETEOSAT_MPE_bounds, null);
64-
var weatherMETEOSAT_IODC_MPE_image = "http://oiswww.eumetsat.int/IPPS/html/GE/IODC/GE_IODC_VP-MPE.png";
65-
var weatherMETEOSAT_IODC_MPE_bounds = new google.maps.LatLngBounds(new google.maps.LatLng(-59.7901, -2.7919), new google.maps.LatLng(59.7901, 116.7913));;
66-
var weatherMETEOSAT_IODC_MPE = new google.maps.GroundOverlay(weatherMETEOSAT_IODC_MPE_image, weatherMETEOSAT_IODC_MPE_bounds, null);
61+
var weatherImageOverlayList = {
62+
'nrl-global-cloudtop': ['http://www.nrlmry.navy.mil/archdat/global/stitched/cloudtop/LATEST.jpg', [[-76, -179.9999], [76, 179.75]]],
63+
'nrl-global-ir': ['http://www.nrlmry.navy.mil/archdat/global/stitched/ir/LATEST.jpg', [[-65, -179.9999], [65, 179.75]]],
64+
'nrl-global-vapor': ['http://www.nrlmry.navy.mil/archdat/global/stitched/vapor/LATEST.jpg', [[-65, -179.9999], [65, 179.75]]],
65+
'meteosat-Odeg-MPE': ['http://oiswww.eumetsat.int/IPPS/html/GE/MET0D/GE_MET0D_VP-MPE.png', [[-57.492200, -57.492200], [57.492200, 57.492200]]],
66+
'meteosat-iodc-MPE': ['http://oiswww.eumetsat.int/IPPS/html/GE/IODC/GE_IODC_VP-MPE.png', [[-59.7901, -2.7919], [59.7901, 116.7913]]]
67+
};
68+
69+
var weatherImageOverlay = new google.maps.GroundOverlay();
6770

6871
var offline = {
6972
get: function(key) {

0 commit comments

Comments
 (0)