Description: Monitors window resize events and updates the component's screen dimensions (screenWidth and screenHeight) whenever the window size changes.
Description: Returns a user-friendly string representation of the IoT type ("Rain" for 'rain', "Flood" for 'flood')
getFormattedIoTtype(item: any): string {
switch (item.iot_type) {
case 'rain':
return 'Rain';
case 'flood':
return 'Flood';
default:
return 'Unknown';
}
}
getFormattedCategory(item: any): string
Description: Categorizes the data based on the latest_data field and IoT type. For rain sensors, it categorizes the intensity as "LIGHT," "HEAVY," "INTENSE," or "TORRENTIAL." For flood sensors, it categorizes the level as "LOW," "MEDIUM," or "HIGH."
Description: Returns a dynamic style object for the status text based on the sensor's status. Colors: Green for "Active," Grey for "Inactive," and Black for unknown status.
Description: Returns a dynamic style object for the category text based on the sensor's latest data. Colors vary depending on the intensity or level for rain and flood sensors.
Description
map-playground.component.ts
getScreenSize(event?)
Description: Monitors window resize events and updates the component's screen dimensions (
screenWidth
andscreenHeight
) whenever the window size changes.Functions for IOT Sensor Details
getFormattedIoTtype(item: any): string
Description: Returns a user-friendly string representation of the IoT type ("Rain" for
'rain'
, "Flood" for'flood'
)getFormattedCategory(item: any): string
Description: Categorizes the data based on the
latest_data
field and IoT type. For rain sensors, it categorizes the intensity as "LIGHT," "HEAVY," "INTENSE," or "TORRENTIAL." For flood sensors, it categorizes the level as "LOW," "MEDIUM," or "HIGH."getStatusDynamicStyle(item: any): { [key: string]: string }
Description: Returns a dynamic style object for the status text based on the sensor's status. Colors: Green for "Active," Grey for "Inactive," and Black for unknown status.
getCategoryDynamicStyle(item: any): { [key: string]: string }
Description: Returns a dynamic style object for the category text based on the sensor's latest data. Colors vary depending on the intensity or level for rain and flood sensors.
Sensor Details in Popup for Mobile Setup
Sensor Graph in Popup for Mobile Setup
async showQcChartMobile(pk: number, appID: string, qcSensorType: QuezonCitySensorType)
Description: Similar function to showQcChart but targeted div is
'qc-mobile-chart'
instead of'graph-dom'
.Main function for adding popup
showQcDataPoints(qcSensorType: QuezonCitySensorType)
Images
Current Design
New Design