# @r2don/react-naver-map

> ## Introduction

Latest version **0.0.21** (published 2025-06-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @r2don/react-naver-map
pnpm add @r2don/react-naver-map
yarn add @r2don/react-naver-map
bun add @r2don/react-naver-map
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.21 |
| Published | 2025-06-17 |
| First published | 2022-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 219.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 11 |
| Author | r2don |
| Maintainers | jbl428, yohanio, lifeisegg123, josworks27 |
| Keywords | react, naver, map, naver-map, react-naver-map |

## Links

- npm: https://www.npmjs.com/package/@r2don/react-naver-map
- Repository: https://github.com/r2don/react-naver-map
- Issues: https://github.com/r2don/react-naver-map/issues
- npm.io page: https://npm.io/package/@r2don/react-naver-map

## Dependencies (1)

- [uuid](https://npm.io/package/uuid.md) ^8.3.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.21 (latest) — 2025-06-17
- 0.0.20 — 2024-10-17
- 0.0.19 — 2024-09-26
- 0.0.18 — 2024-09-23
- 0.0.17 — 2024-09-11
- 0.0.16 — 2024-04-11
- 0.0.15 — 2024-04-11
- 0.0.14 — 2024-03-18
- 0.0.12 — 2023-08-16
- 0.0.11 — 2023-04-21
- 0.0.10 — 2022-10-16
- 0.0.9 — 2022-10-16
- 0.0.8 — 2022-10-03
- 0.0.7 — 2022-08-15
- 0.0.6 — 2022-07-31
- … 5 more at https://npm.io/package/@r2don/react-naver-map/versions

## README

# react-naver-map

## Introduction

네이버 맵을 리액트에서 사용하기 편하게 만들어 둔 라이브러리입니다.

## Installation

```sh
# with npm
npm i @r2don/react-naver-map

# with yarn
yarn add @r2don/react-naver-map

# with pnpm
pnpm add @r2don/react-naver-map
```

## Usage

> 기본 스타일이 적용되어있지 않으니, 필요에 맞게 width와 height를 적용해주세요.

### Map component

```js
import { Map, useNaverMapInit, Marker } from "@r2don/react-naver-map";

const MARKERS = [
  { latitude: 37, longitude: 127 },
  { latitude: 37.5, longitude: 127.5 },
  { latitude: 38, longitude: 128 },
  { latitude: 38.5, longitude: 128.5 },
];

function App() {
  const { isLoaded } = useNaverMapInit();

  if (!isLoaded) return null;

  return (
    <Map
      center={{ latitude: 37.3595704, longitude: 127.105399 }}
      style={{ height: "500px", width: "500px" }}
    >
      {MARKERS.map((marker) => (
        <Marker key={JSON.stringify(marker)} position={marker} />
      ))}
    </Map>
  );
}
```

### PolyLine Component

```js
import { Map, useNaverMapInit, Marker, Polyline } from "@r2don/react-naver-map";

const MARKERS = [
  { latitude: 37, longitude: 127 },
  { latitude: 37.5, longitude: 127.5 },
  { latitude: 38, longitude: 128 },
  { latitude: 38.5, longitude: 128.5 },
];

function App() {
  const { isLoaded } = useNaverMapInit();

  if (!isLoaded) return null;

  const path = [{ latitude: 37.3595704; longitude: 127.105399 }, { latitude: 37.3585781; longitude: 127.1053234 }];
  const mid = {
    latitude: (path[0].latitude + path[1].latitude) / 2,
    longitude: (path[0].longitude + path[1].longitude) / 2,
  }

  return (
    <Map
      center={{ latitude: mid.latitude, longitude: mid.longitude }}
      style={{ height: "500px", width: "500px" }}
    >
      {MARKERS.map((marker) => (
        <Marker key={JSON.stringify(marker)} position={marker} />
      ))}
      <Polyline path={path} />
    </Map>
  );
}
```

## License

Licensed under the MIT License, Copyright (c) 2022 r2don.

See [LICENSE](https://github.com/r2don/react-naver-map/blob/main/LICENSE) for more information.

---
_Source: https://npm.io/package/@r2don/react-naver-map · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
