Skip to content

PeterBreen/gmapreact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Maps / Create React App

Renders a Google Map in React based on this Codepen and bootstrapped with Create React App.

I created this repo as an example of one way to render Google Maps into a Create React App environment. I found many examples of how to combine React + GMaps, but none which worked at a "drop in and go" level of simplicity which the CRA bootstrap provides for starting React apps.

Google makes it easy for non-React environments: A single <script> tag and <div id="map"></div> and you're set - but this does not work for React. Hopefully, this repo does, though! :)

To use:

Fork/clone/download/retype repo, however you want.

  • Edit public/index.html and change line 7 to include your Google Maps API key (Don't have one? Get a Google Maps API key here)

  • npm start to launch application.

  • By default, app will serve on localhost:3000 and should display the Create React App logo and header with a Google Map centered on Seattle, WA showing a pin and info window.

About

Google Maps / Create React App - a quick starter repo for anyone using CRA and wanting to quickly deploy a Google Map

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors