|
|
@ -122,10 +122,10 @@ function processAfterInitializationMap(geoFencingEnabled) {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
map.addControl(L.control.fullscreen({position: 'bottomright'}));
|
|
|
|
map.addControl(L.control.fullscreen({position: 'bottomright'}));
|
|
|
|
|
|
|
|
|
|
|
|
geoAlertsBar = L.control.geoAlerts({position: 'topright'});
|
|
|
|
// geoAlertsBar = L.control.geoAlerts({position: 'topright'});
|
|
|
|
if (geoFencingEnabled) {
|
|
|
|
// if (geoFencingEnabled) {
|
|
|
|
map.addControl(geoAlertsBar);
|
|
|
|
// map.addControl(geoAlertsBar);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
groupedOverlays = {
|
|
|
|
groupedOverlays = {
|
|
|
|
"Web Map Service layers": {}
|
|
|
|
"Web Map Service layers": {}
|
|
|
@ -256,7 +256,7 @@ function focusOnSpatialObject(objectId) {
|
|
|
|
// TODO: check the map._layersMaxZoom and set the zoom level accordingly
|
|
|
|
// TODO: check the map._layersMaxZoom and set the zoom level accordingly
|
|
|
|
|
|
|
|
|
|
|
|
spatialObject.marker.openPopup();
|
|
|
|
spatialObject.marker.openPopup();
|
|
|
|
getAlertsHistory(deviceType, deviceId, new Date($('#timeFromCal').val()).getTime(), new Date($('#timeToCal').val()).getTime());
|
|
|
|
// getAlertsHistory(deviceType, deviceId, new Date($('#timeFromCal').val()).getTime(), new Date($('#timeToCal').val()).getTime());
|
|
|
|
spatialObject.drawPath();
|
|
|
|
spatialObject.drawPath();
|
|
|
|
if (speedGraphControl) {
|
|
|
|
if (speedGraphControl) {
|
|
|
|
setTimeout(function () {
|
|
|
|
setTimeout(function () {
|
|
|
@ -435,11 +435,11 @@ function drawSpatialObject() {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (geoFencingEnabled) {
|
|
|
|
// if (geoFencingEnabled) {
|
|
|
|
var alertsFromDate = new Date();
|
|
|
|
// var alertsFromDate = new Date();
|
|
|
|
alertsFromDate.setHours(alertsFromDate.getHours() - 24); //last 24 hours
|
|
|
|
// alertsFromDate.setHours(alertsFromDate.getHours() - 24); //last 24 hours
|
|
|
|
getAlertsHistory(deviceType, deviceId, alertsFromDate.valueOf(), toDate.valueOf());
|
|
|
|
// getAlertsHistory(deviceType, deviceId, alertsFromDate.valueOf(), toDate.valueOf());
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(function () {
|
|
|
|
setTimeout(function () {
|
|
|
|
map.invalidateSize();
|
|
|
|
map.invalidateSize();
|
|
|
@ -513,7 +513,7 @@ function focusOnHistorySpatialObject(objectId, timeFrom, timeTo) {
|
|
|
|
// TODO: check the map._layersMaxZoom and set the zoom level accordingly
|
|
|
|
// TODO: check the map._layersMaxZoom and set the zoom level accordingly
|
|
|
|
|
|
|
|
|
|
|
|
spatialObject.marker.openPopup();
|
|
|
|
spatialObject.marker.openPopup();
|
|
|
|
getAlertsHistory(deviceType, deviceId, new Date($('#timeFromCal').val()).getTime(), new Date($('#timeToCal').val()).getTime());
|
|
|
|
// getAlertsHistory(deviceType, deviceId, new Date($('#timeFromCal').val()).getTime(), new Date($('#timeToCal').val()).getTime());
|
|
|
|
spatialObject.drawPath();
|
|
|
|
spatialObject.drawPath();
|
|
|
|
if (speedGraphControl) {
|
|
|
|
if (speedGraphControl) {
|
|
|
|
setTimeout(function () {
|
|
|
|
setTimeout(function () {
|
|
|
|