0.1.1 • Published 7 months ago

@zzang535/react-google-map v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Google Map React Component

A lightweight React component for rendering Google Maps with custom markers. This component is designed for use with Next.js or any React application and is simple to configure.


📦 Installation

To install the component, run the following command:

npm install @zzang535/react-google-map
yarn add @zzang535/react-google-map

🚀 Usage

Basic example:

'use client'; // For Next.js client-side components

import { GoogleMap, type GoogleMapProps } from "@zzang535/react-google-map";

export default function Home() {
  const mapProps: GoogleMapProps = {
    apiKey: process.env.NEXT_PUBLIC_GOOGLE_MAP_API_KEY!,
    center: {
      lat: 37.480392,
      lng: 126.998787,
    },
    zoom: 16,
    markers: [
      {
        lat: 37.480392,
        lng: 126.998787,
      },
    ],
    mapId: "map-id",
  };

  return (
    <div style={{ height: "100vh", width: "100vw", border: "10px solid pink" }}>
      <GoogleMap {...mapProps} />
    </div>
  );
}
0.1.0

7 months ago

0.1.1

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago