|
|
@ -327,25 +327,31 @@ function notifyError(message) {
|
|
|
|
function enableRealTime() {
|
|
|
|
function enableRealTime() {
|
|
|
|
document.getElementById('realTimeShow').style.display = 'none';
|
|
|
|
document.getElementById('realTimeShow').style.display = 'none';
|
|
|
|
spatialObject = currentSpatialObjects[selectedSpatialObject];
|
|
|
|
spatialObject = currentSpatialObjects[selectedSpatialObject];
|
|
|
|
spatialObject.removePath();
|
|
|
|
if (spatialObject) {
|
|
|
|
spatialObject.marker.closePopup();
|
|
|
|
spatialObject.removePath();
|
|
|
|
|
|
|
|
spatialObject.marker.closePopup();
|
|
|
|
|
|
|
|
}
|
|
|
|
selectedSpatialObject = null;
|
|
|
|
selectedSpatialObject = null;
|
|
|
|
clearFocus();
|
|
|
|
clearFocus();
|
|
|
|
clearMap();
|
|
|
|
clearMap();
|
|
|
|
document.getElementById('objectInfo').style.display = 'none';
|
|
|
|
document.getElementById('objectInfo').style.display = 'none';
|
|
|
|
isBatchModeOn = false;
|
|
|
|
isBatchModeOn = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function focusOnHistorySpatialObject(objectId, timeFrom, timeTo) {
|
|
|
|
function focusOnHistorySpatialObject(objectId, timeFrom, timeTo) {
|
|
|
|
if (!timeFrom) {
|
|
|
|
if (!timeFrom) {
|
|
|
|
notifyError('No start time provided to show history. Please provide a suitable value' + timeFrom);
|
|
|
|
notifyError('No start time provided to show history. Please provide a suitable value' + timeFrom);
|
|
|
|
} else if (!timeTo) {
|
|
|
|
} else if (!timeTo) {
|
|
|
|
notifyError('No end time provided to show history. Please provide a suitable value' + timeTo);
|
|
|
|
notifyError('No end time provided to show history. Please provide a suitable value' + timeTo);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$('#dateRangePopup').dialog('close');
|
|
|
|
document.getElementById('realTimeShow').style.display = 'block';
|
|
|
|
document.getElementById('realTimeShow').style.display = 'block';
|
|
|
|
isBatchModeOn = true;
|
|
|
|
isBatchModeOn = true;
|
|
|
|
clearFocus(); // Clear current focus if any
|
|
|
|
clearFocus(); // Clear current focus if any
|
|
|
|
clearMap();
|
|
|
|
clearMap();
|
|
|
|
var tableData = getProviderData(timeFrom, timeTo);
|
|
|
|
var fromDate = new Date(timeFrom);
|
|
|
|
|
|
|
|
var toDate = new Date(timeTo);
|
|
|
|
|
|
|
|
var tableData = getProviderData(fromDate.valueOf() / 1000, toDate.valueOf() / 1000);
|
|
|
|
for (var i = 0; i < tableData.length; i++) {
|
|
|
|
for (var i = 0; i < tableData.length; i++) {
|
|
|
|
var data = tableData[i];
|
|
|
|
var data = tableData[i];
|
|
|
|
var geoMessage = {
|
|
|
|
var geoMessage = {
|
|
|
@ -401,7 +407,6 @@ function focusOnHistorySpatialObject(objectId, timeFrom, timeTo) {
|
|
|
|
createChart();
|
|
|
|
createChart();
|
|
|
|
chart.load({columns: [spatialObject.speedHistory.getArray()]});
|
|
|
|
chart.load({columns: [spatialObject.speedHistory.getArray()]});
|
|
|
|
}, 100);
|
|
|
|
}, 100);
|
|
|
|
$('#dateRangePopup').dialog('close');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|