Type Alias TInfoWindow

TInfoWindow: {
    caching: boolean;
    dataKey?: string;
    enabled: boolean;
    render?: ((data: any) => Promise<string>);
    trigger: "click" | "mouseover";
}

Type declaration

  • caching: boolean

    Controls whether the content of the info window should be cached. If set to true, the content of the info window will be cached, and the render function or the corresponding dataKey value in the data source will only be executed once for each unique data point. Subsequent invocations will retrieve the content from the cache, improving performance

    true
    
  • OptionaldataKey?: string

    Specifies the key in the data source that represents the content of the info window. The value of the corresponding key in the data source will be used as the content for the info window.

  • enabled: boolean
  • Optionalrender?: ((data: any) => Promise<string>)

    Allows you to define a custom rendering function for the content of the info window. This function will be responsible for generating the HTML or content structure for the info window. If render is provided, it will take precedence over the dataKey option

    render: (data) => {
    const html = `
    <div>
    <strong>${data.NAME}</strong>
    </div>
    `;
    return html;
    }
      • (data): Promise<string>
      • Parameters

        • data: any

          The data object representing the data source associated with the marker.

        Returns Promise<string>

        The HTML string representing the content of the info window.

  • trigger: "click" | "mouseover"

    Defines the event that triggers the display of the info window. Possible values:

    • click: The info window is displayed when the user clicks on a marker.
    • mouseover: The info window is displayed when the user hovers over a marker.