InfoWindow
Renders an InfoWindow
API Reference
Props
| Property | Default | Type/Description |
|---|---|---|
anchor | - | google.maps.AdvancedMarkerElementAnchors the InfoWindow to a Marker. position is not required if anchor is used. |
ariaLabel | - | stringThe aria-label attribute for the InfoWindow. |
class | - | stringThe class name of the Marker Content. Only applicable to HTML content. |
disableAutoPan | false | booleanIf true, the InfoWindow will not pan the map when opened. |
headerContent | - | string | JSX.ElementThe content of the InfoWindow header. |
headerDisabled | false | booleanIf true, the InfoWindow header will be disabled. |
maxWidth | - | stringThe maximum width of the InfoWindow. |
minWidth | - | stringThe minimum width of the InfoWindow. |
open | false | booleanIf true, the InfoWindow will be open. |
pixelOffset | - | [number, number]The offset from the marker's position to the tip of an InfoWindow that has been opened with the marker. |
position | - | google.maps.LatLngLiteralThe marker's position. |
shouldFocus | false | booleanIf true, the InfoWindow will focus on mount. |
style | - | JSX.CSSPropertiesThe style of the Marker Content. Only applicable to HTML content. |
zIndex | - | numberThe marker's zIndex. |
Events
| Event Name | Type/Description |
|---|---|
onClose | () => voidFired when the InfoWindow is closed. |
onCloseClick | () => voidFired when the close button is clicked. |
onOpenChange | (open: boolean) => voidFired when the InfoWindow open state changes. |