import { GeoJSONSource, MapSourceDataEvent, Marker } from "maplibre-gl"; import { AssetWithLocation, ClusterConfig, MapFilter } from "./types"; import { BaseMap } from "./base-map"; import { AttributeEvent } from "@openremote/model"; /** * This class handles where to display asset markers and clusters on the map. * * Currently, the standard flow to display assets as markers on the map goes as follows: * * 1. The map page adds assets to the {@link AssetMap}, which computes assets in view and then dispatches {@link OrMapMarkersChangedEvent}. * 2. The map page receives the event, renders the received assets as {@link OrMapMarkerAsset} by including them inside the map element's HTML body. * 3. The map component then receives either an event from the {@link OrMapMarkerAsset}, * or when the map component sees a slotted {@link OrMapMarker} was added. From there the {@link OrMapMarker}s are passed to the {@link BaseMap} to be assigned to a MapLibre marker. * * @todo consider using `this._map.setGlobalStateProperty` for static cluster property */ export declare class AssetMap extends BaseMap { private static _clusterProperty; private _allAssets; protected _assets: Record; protected _assetTypeColors: Record; protected _assetsOnScreen: Record; protected _cachedClusters: Record; protected _clustersOnScreen: Record; protected _clusterConfig?: ClusterConfig; protected _source?: GeoJSONSource; private _hostElement; private _filters?; private _showLegend; private _activeFilter; private _excludedTypes; private _allAssetTypes; private _allAssetCounts; private _presetFilterControl?; private _legendControl?; private _onPresetFilter; private _onLegendChange; protected _onMove: () => void; protected _onMoveEnd: (e: any) => void; protected _onData: (e: MapSourceDataEvent) => void; constructor(styleParent: Node, mapContainer: HTMLElement, hostElement: HTMLElement, showGeoCodingControl?: boolean, showBoundaryBox?: boolean, useZoomControls?: boolean, showGeoJson?: boolean, clusterConfig?: ClusterConfig, filters?: MapFilter[], showLegend?: boolean); build(): Promise; addAsset(asset: AssetWithLocation): void; addAssets(assets: AssetWithLocation[]): void; updateAttribute(event: AttributeEvent): void; removeAssets(ids: string[]): void; removeAllAssets(): void; setFilters(filters: MapFilter[] | undefined): void; setShowLegend(showLegend: boolean): void; private _sourceAddAsset; private _sourceAddAssets; private _syncAssetMeta; private _isAssetVisible; private _applyVisibilityFilters; unload(): void; private load; protected _updateMarkers(): void; private _updateAssets; private _updateClusters; private _getClusterMarker; private _hasRequired; private _isMissing; private _getClusterProperties; private static _getClusterPropertyExpression; private static _assetToFeature; } //# sourceMappingURL=asset-map.d.ts.map