Hover marker information added and fixed JS getHours bug
rodzic
f3d0c0af83
commit
2bd107d7bb
|
@ -9,7 +9,7 @@ function createModel($post_array) {
|
|||
$pred_model = array();
|
||||
|
||||
// first, populate the prediction model
|
||||
$pred_model['hour'] = $post_array['hour'] + 1; //adjust for GMT
|
||||
$pred_model['hour'] = $post_array['hour']; //adjust for GMT
|
||||
$pred_model['min'] = $post_array['min'];
|
||||
$pred_model['sec'] = $post_array['sec'];
|
||||
|
||||
|
|
|
@ -214,14 +214,14 @@ function parseCSV(lines) {
|
|||
position: launch_pt,
|
||||
map: map,
|
||||
icon: launch_icon,
|
||||
title: 'Balloon launch ('+launch_lat+', '+launch_lon+')'
|
||||
title: 'Balloon launch ('+launch_lat+', '+launch_lon+') at ' + POSIXtoHM(launch_time)
|
||||
});
|
||||
|
||||
var land_marker = new google.maps.Marker({
|
||||
position: land_pt,
|
||||
map:map,
|
||||
icon: land_icon,
|
||||
title: 'Predicted Landing ('+land_lat+', '+land_lon+')'
|
||||
title: 'Predicted Landing ('+land_lat+', '+land_lon+') at ' + POSIXtoHM(land_time)
|
||||
});
|
||||
|
||||
var path_polyline = new google.maps.Polyline({
|
||||
|
@ -381,6 +381,14 @@ function toggleWindow(window_name, linker, onhide, onshow, force) {
|
|||
}
|
||||
}
|
||||
|
||||
function POSIXtoHM(timestamp) {
|
||||
var ts = new Date();
|
||||
ts.setTime(timestamp*1000);
|
||||
var adjHours = ts.getHours() + (ts.getTimezoneOffset()/60);
|
||||
var str = adjHours + ":" + ts.getMinutes();
|
||||
return str;
|
||||
}
|
||||
|
||||
// launch site dropdown switcher
|
||||
function UpdateLaunchSite(id) {
|
||||
txtLat = document.getElementById("lat");
|
||||
|
|
Ładowanie…
Reference in New Issue