Optional
dataSpecifies 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.
Optional
render?: ((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;
}
The data object representing the data source associated with the marker.
The HTML string representing the content of the info window.
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.
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