nazipsa-kakao-map

kakao map with React


Keywords
react-kakao-map
License
MIT
Install
npm install nazipsa-kakao-map@0.0.2

Documentation

tenel-react-kakao-map

๊นƒํ—ˆ๋ธŒ | ๋ฒ„๊ทธ ๋ฆฌํฌํŠธ

Installation

$ npm install react react-dom tenel-react-kakao-map

Getting Started

import * as React from "react";
import * as ReactDOM from "react-dom";

const App: React.FunctionComponent = () => {
  const [container, setContainer] = React.useState(null);
  const [mapCenter] = React.useState({ lat: 33.450701, lng: 126.570667 });

  return (
    <div ref={(ref) => setContainer(ref)} style={{ width: 800, height: 800 }}>
      {container ?
        ? (
          <KakaoMaps.Map
            container={ref.current}
            center={mapCenter}
            overlayMapTypes={overlayMapTypes}
          >
            <KakaoMaps.Marker position={mapCenter}/>
          </KakaoMaps.Map>
        )
        : <span>๋กœ๋“œ์ค‘...</span>
      }
    </div>
  );
};