- Google maps in React
- Adding Markers
- Panning and zooming maps
- Disable default controls
- Places Autocomplete
- Directions Service
- Directions Renderer on map
Create an API in the google developers console https://console.developers.google.com, make sure to enable billing for the google project, otherwise you may get a warning as development purposes only.
Add a .env
file or .env.local
in the project root and specify your API key as REACT_APP_GOOGLE_MAPS_API_KEY=your_api_key_here
In the project directory, you can run:
yarn install
yarn start
OR using npm
npm install
npm start
You can fork this repo and send me a PR.