POI: {
    init: ((mapOrOptions: any, config: any) => void);
    loadAndDisplay: (() => void);
    displayPois: ((pois: any) => void);
    addPoi: ((poi: any) => any);
    add: ((poi: any) => any);
    getAllPois: (() => any);
    setFilteredDisplay: ((filteredPois: any[]) => void);
    getPoiById: ((id: any) => any);
    reload: ((pois: any) => void);
    showPoiDetails: ((poi: any, customLayout: any) => Promise<void>);
    hideSidePanel: (() => void);
    openSidePanelWithLayout: ((poi: any, customLayout: any) => void);
    getLayer: (() => any);
    getDisplayedPoisCount: (() => any);
} = ...

API public of the module POI All functions delegate to the appropriate sub-modules

Type declaration

  • init: ((mapOrOptions: any, config: any) => void)

    Initializes the module POI avec the map et la configuration. Supporte deux signatures: init(map, config) et init({map, config}).

      • (mapOrOptions, config): void
      • Parameters

        • mapOrOptions: any
        • config: any

        Returns void

  • loadAndDisplay: (() => void)

    Loads POI data from the configured endpoint and renders all markers on the map. Equivalent to calling load() + display().

      • (): void
      • Returns void

  • displayPois: ((pois: any) => void)

    Renders an array of POI objects as markers on the map.

      • (pois): void
      • Parameters

        • pois: any

          Array of POI objects to display.

        Returns void

  • addPoi: ((poi: any) => any)

    Adds a single POI to the map and internal registry.

      • (poi): any
      • Parameters

        • poi: any

          POI object to add.

        Returns any

        The created MapLibre marker element, or null on failure.

  • add: ((poi: any) => any)

    Alias for POI.addPoi.

      • (poi): any
      • Parameters

        • poi: any

          POI object to add.

        Returns any

        true on success, false on failure.

  • getAllPois: (() => any)

    Returns all POI objects currently in the internal registry.

      • (): any
      • Returns any

        Array of all POI objects.

  • setFilteredDisplay: ((filteredPois: any[]) => void)

    Updates the MapLibre cluster source with a filtered POI subset without modifying the internal full dataset (state.allPois). Use this for filter operations to avoid data loss on subsequent filter calls.

      • (filteredPois): void
      • Parameters

        • filteredPois: any[]

          Filtered array of POI objects to display.

        Returns void

  • getPoiById: ((id: any) => any)

    Retrieves a POI by its unique identifier.

      • (id): any
      • Parameters

        • id: any

          POI identifier.

        Returns any

        The matching POI object, or null if not found.

  • reload: ((pois: any) => void)

    Clears all current POI markers and re-renders the given array.

      • (pois): void
      • Parameters

        • pois: any

          Replacement array of POI objects.

        Returns void

  • showPoiDetails: ((poi: any, customLayout: any) => Promise<void>)

    Opens the side panel and displays the detail view for the given POI.

      • (poi, customLayout): Promise<void>
      • Parameters

        • poi: any

          POI object to display.

        • customLayout: any

          Optional custom layout configuration.

        Returns Promise<void>

  • hideSidePanel: (() => void)

    Closes the POI side panel.

      • (): void
      • Returns void

  • openSidePanelWithLayout: ((poi: any, customLayout: any) => void)
      • (poi, customLayout): void
      • Parameters

        • poi: any
        • customLayout: any

        Returns void

  • getLayer: (() => any)

    Returns the MapLibre source cluster group containing all POI markers.

      • (): any
      • Returns any

        The cluster group or layer group, or null if not initialised.

  • getDisplayedPoisCount: (() => any)

    Returns the number of POI markers currently visible on the map.

      • (): any
      • Returns any

        Count of displayed POIs.