InfoWindow
InfoWindow 컴포넌트는 정보 창을 표시합니다. 문자열 또는 React children을 content로 받습니다.
사용법
import { InfoWindow } from 'react-naver-maps';
<InfoWindow content="안녕하세요" position={{ lat: 37.5, lng: 127.0 }} />;
Props
| 이름 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
content | string | ✓ | - | string content. 네이버맵 네이티브 content 파싱 파이프라인을 그대로 사용한다. |
position | naver.maps.LatLng | naver.maps.LatLngLiteral | undefined | - | - | 위치 (anchor 없을 때) |
anchor | naver.maps.Coord | naver.maps.CoordLiteral | naver.maps.Marker | undefined | - | - | anchor (Marker ref 등). open(map, anchor)로 전달된다. |
open | boolean | undefined | - | - | 열림 상태. 전달 시 선언적 제어, 미전달 시 ref로 직접 open()/close() 호출. |
maxWidth | number | undefined | - | - | - |
backgroundColor | string | undefined | - | - | - |
borderColor | string | undefined | - | - | - |
borderWidth | number | undefined | - | - | - |
disableAutoPan | boolean | undefined | - | - | - |
disableAnchor | boolean | undefined | - | - | - |
anchorSkew | boolean | undefined | - | - | - |
anchorSize | naver.maps.Size | naver.maps.SizeLiteral | undefined | - | - | - |
anchorColor | string | undefined | - | - | - |
pixelOffset | naver.maps.Point | undefined | - | - | - |
zIndex | number | undefined | - | - | - |
onOpen | (() => void) | undefined | - | - | - |
onClose | (() => void) | undefined | - | - | - |