react-google-maps-loader
React Component to use google maps services into your react applications using a render prop.
Getting started
You can download react-google-maps-loader
from the NPM registry via the npm
or yarn
commands
yarn add react-google-maps-loader
npm install react-google-maps-loader --save
If you don't use package manager and you want to include react-google-maps-loader
directly in your html, you could get it from the UNPKG CDN
https://unpkg.com/react-google-maps-loader/dist/react-google-maps-loader.min.js.
Usage
import React from "react"
import ReactGoogleMapLoader from "react-google-maps-loader"
const App = () =>
<ReactGoogleMapLoader
params={{
key: YOUR_API_KEY, // Define your api key here
libraries: "places,geometry", // To request multiple libraries, separate them with a comma
}}
render={googleMaps =>
googleMaps && (
<div>Google Maps is loaded !</div>
)}
/>
Demo
See Demo page
Contributing
- ⇄ Pull/Merge requests and ★ Stars are always welcome.
- For bugs and feature requests, please create an issue.
- Pull requests must be accompanied by passing automated tests (
npm test
).
See CONTRIBUTING.md guidelines
Changelog
See changelog
License
This project is licensed under the MIT License - see the LICENCE.md file for details