Skip to content

Commit 73c03c6

Browse files
added METOSAT MPE data
1 parent a5fdbd2 commit 73c03c6

File tree

3 files changed

+69
-41
lines changed

3 files changed

+69
-41
lines changed

index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,7 @@ <h2>Weather
187187
</svg>
188188
</h2>
189189
<hr>
190-
<span>Here you can access various weather overlays. This an <b>experimental feature</b>. Mobile users be aware that this can quickly eat your data allowance.</span>
191-
<br />
192-
<br />
190+
<p>Here you can access various weather overlays. This an <b>experimental feature</b>. Mobile users be aware that this can quickly eat your data allowance.</p>
193191
</div>
194192
</div>
195193
<div id="chasecarbox" style="display: none" class="flatpage">

js/app.js

Lines changed: 61 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -624,47 +624,61 @@ $(window).ready(function() {
624624

625625
// weather feature
626626

627-
// north america overlays
627+
// list of overlays
628628
var overlayList = [
629-
['nexrad-n0q-900913', 'NEXRAD Base Reflectivity'],
630-
['goes-ir-4km-900913', 'GOES NA Infrared ~4km'],
631-
['goes-wv-4km-900913', 'GOES NA Water Vapor ~4km'],
632-
['goes-vis-1km-900913', 'GOES NA Visible ~1km'],
633-
['goes-east-ir-4km-900913', 'GOES East CONUS Infrared'],
634-
['goes-east-wv-4km-900913', 'GOES East CONUS Water Vapor'],
635-
['goes-east-vis-1km-900913', 'GOES East CONUS Visible'],
636-
['goes-west-ir-4km-900913', 'GOES West CONUS Infrared'],
637-
['goes-west-wv-4km-900913', 'GOES West CONUS Water Vapor'],
638-
['goes-west-vis-1km-900913', 'GOES West CONUS Visible'],
639-
['hawaii-vis-900913', 'GOES West Hawaii Visible'],
640-
['alaska-vis-900913', 'GOES West Alaska Visible'],
641-
['alaska-ir-900913', 'GOES West Alaska IR'],
642-
['alaska-wv-900913', 'GOES West Alaska Water Vapor'],
643-
['q2-n1p-900913', 'Q2 1 Hour Precipitation'],
644-
['q2-p24h-900913', 'Q2 24 Hour Precipitation'],
645-
['q2-p48h-900913', 'Q2 48 Hour Precipitation'],
646-
['q2-p72h-900913', 'Q2 72 Hour Precipitation'],
647-
['q2-hsr-900913', 'MRMS Hybrid-Scan Reflectivity Composite.'],
629+
['Europe/Africa', [
630+
['meteosat-Odeg-MPE', 'METEOSAT Precip. Estimate']
631+
]],
632+
['Indian Ocean', [
633+
['meteosat-iodc-MPE', 'METEOSAT IODC Precip. Est.']
634+
]],
635+
['North America', [
636+
['nexrad-n0q-900913', 'NEXRAD Base Reflectivity'],
637+
['goes-ir-4km-900913', 'GOES NA Infrared ~4km'],
638+
['goes-wv-4km-900913', 'GOES NA Water Vapor ~4km'],
639+
['goes-vis-1km-900913', 'GOES NA Visible ~1km'],
640+
['goes-east-ir-4km-900913', 'GOES East CONUS Infrared'],
641+
['goes-east-wv-4km-900913', 'GOES East CONUS Water Vapor'],
642+
['goes-east-vis-1km-900913', 'GOES East CONUS Visible'],
643+
['goes-west-ir-4km-900913', 'GOES West CONUS Infrared'],
644+
['goes-west-wv-4km-900913', 'GOES West CONUS Water Vapor'],
645+
['goes-west-vis-1km-900913', 'GOES West CONUS Visible'],
646+
['hawaii-vis-900913', 'GOES West Hawaii Visible'],
647+
['alaska-vis-900913', 'GOES West Alaska Visible'],
648+
['alaska-ir-900913', 'GOES West Alaska IR'],
649+
['alaska-wv-900913', 'GOES West Alaska Water Vapor'],
650+
['q2-n1p-900913', 'Q2 1 Hour Precipitation'],
651+
['q2-p24h-900913', 'Q2 24 Hour Precipitation'],
652+
['q2-p48h-900913', 'Q2 48 Hour Precipitation'],
653+
['q2-p72h-900913', 'Q2 72 Hour Precipitation'],
654+
['q2-hsr-900913', 'MRMS Hybrid-Scan Reflectivity Composite.']
655+
]]
648656
];
649657

650658
// generate the list of switches for each overlay
651659
var elm = $("#weatherbox .slimContainer");
652-
elm.append("<h4>North America</h4><hr>");
653-
654-
var i;
655-
for(i in overlayList) {
656-
var id = overlayList[i][0];
657-
var name = overlayList[i][1];
658-
659-
var html = '<div class="row option">'
660-
+ '<span><b>'+name+'</b></span>'
661-
+ '<div class="switch off" id="sw_weather_'+id+'" data-weatherid="'+id+'">'
662-
+ '<span class="thumb"></span>'
663-
+ '<input type="checkbox" id="opt_weather_'+id+'">'
664-
+ '</div>'
665-
+ '</div>';
666-
667-
elm.append(html);
660+
var j;
661+
for(j in overlayList) {
662+
var region = overlayList[j][0];
663+
var switches = overlayList[j][1];
664+
665+
elm.append("<h4>"+region+"</h4><hr>");
666+
667+
var i;
668+
for(i in switches) {
669+
var id = switches[i][0];
670+
var name = switches[i][1];
671+
672+
var html = '<div class="row option">'
673+
+ '<span><b>'+name+'</b></span>'
674+
+ '<div class="switch off" id="sw_weather_'+id+'">'
675+
+ '<span class="thumb"></span>'
676+
+ '<input type="checkbox" id="opt_weather_'+id+'">'
677+
+ '</div>'
678+
+ '</div>';
679+
680+
elm.append(html);
681+
}
668682
}
669683

670684
// the magic that makes the switches do things
@@ -683,12 +697,21 @@ $(window).ready(function() {
683697
e.removeClass('off').addClass('on');
684698
on = 1;
685699
}
700+
weatherMETEOSAT_MPE.setMap(null);
701+
weatherMETEOSAT_IODC_MPE.setMap(null);
702+
map.overlayMapTypes.setAt("0", null);
686703

687704
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+
return;
711+
}
712+
688713
weatherOverlayId = id;
689714
map.overlayMapTypes.setAt("0", weatherOverlay);
690-
} else {
691-
map.overlayMapTypes.setAt("0", null);
692715
}
693716
});
694717
});

js/tracker.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ 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);
67+
6168
var offline = {
6269
get: function(key) {
6370
if(typeof localStorage == 'undefined') return null;

0 commit comments

Comments
 (0)