react-gmaps-id

1.2.2 • Public • Published

React Gmaps Id

=== How To Use ===

npm install react-gmaps-id

=== Example Code ===

import ReactGmapsId from "react-gmaps-id";

export default function App() {

  /* Get Data After Drag Marker */
  const onDrag = (val) => {
    console.log(val); // Get all data
    console.log(val[0].geometry.location.toJSON()); // Get LatLng 
  };

  return (
    <ReactGmapsId
      name="test" // Unique key of ReactGmapsId
      height="200px" // Height layout of maps
      width="200px" // Width layout of maps
      zoom="10" // Zoom maps
      defaultMap="Dapur Rumaisha" // Set default center of maps
      onDrag={onDrag} // Callback function Drag marker
      onError={(e) => {console.log(e)}} // Callback error function
      keyGoogle="GOOGLE_KEY" // Google key
    />
  );
}

Codesanbox

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.2
    48
    • latest

Version History

Package Sidebar

Install

npm i react-gmaps-id

Weekly Downloads

48

Version

1.2.2

License

ISC

Unpacked Size

9.27 kB

Total Files

7

Last publish

Collaborators

  • ugiispoyo