AlertImpactPolygonPlotter

Keeps the map's alert impacted-area polygon overlays in sync with the currently active alerts of the selected property. This is the production consumer of plotPolygonOverlayOnTheMap / removePolygonOverlayFromTheMap driven by map-ui at map-open, property change and live alert changes.

sync is declarative: callers pass the FULL desired set of impacted-area polygons; overlays no longer in the set (cleared alerts, previously selected property) are removed by their (propertyId, buildingId, floorId, polygonId) identity tuple, new areas are plotted, and already-plotted areas are left untouched (idempotent re-sync, e.g. on resume). Plotting is additive only — it never recenters or zooms the camera.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
open class AreaPolygon
Impacted-area polygon of an active alert, as supplied by the alerts sdk from its local cache: the area's identity tuple, its GeoJSON lon/lat rings (outer ring at index 0, holes at 1+, from BaseAlertResponse.Shape.getAsPolygon()) and the alert's polygon style.

Properties

Link copied to clipboard
val FLOOR_ANY: Int = -2147483648
Floor sentinel meaning "no floor scoping": every supplied area is kept regardless of its floor (the 2-arg sync / property-level / back-compat path).

Functions

Link copied to clipboard
open fun clear(@NonNull customPlot: MapApi.CustomPlot)
Remove every overlay previously plotted by this plotter (e.g.
Link copied to clipboard
Sync the plotted alert impacted-area overlays to the given desired set, WITHOUT floor scoping (property-level / back-compat).
open fun sync(@NonNull customPlot: MapApi.CustomPlot, @NonNull areas: List<AlertImpactPolygonPlotter.AreaPolygon>, currentBuildingId: Int, currentFloorId: Int)
Floor-aware sync: keeps the plotted overlays in sync with the desired set, scoped to the current visible floor.
Link copied to clipboard
open fun syncForFloor(@NonNull customPlot: MapApi.CustomPlot, currentBuildingId: Int, currentFloorId: Int)
Re-filter and re-sync the previously requested area set for a new visible floor, WITHOUT re-fetching from the alerts provider (driven on the map's floor-change event).