New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-gmaps-id

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-gmaps-id

For using google maps with ReactJs

latest
Source
npmnpm
Version
1.2.2
Version published
Weekly downloads
5
25%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

react gmaps

FAQs

Package last updated on 04 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts