React.js and Google Maps integration
https://www.lensoftware.com/presentations/2018-05-28/
Tatiana Lenz
git clone https://github.com/TattyFromMelbourne/bike-trail
cd bike-trail
npm install
touch .env
You will also need to define the following environment variable in your .env file:-
REACT_APP_GOOGLE_API_KEY='<your Google Maps API Key>'
Please also take a look at the package.json file and change the following line to what is appropriate for your environment:-
"homepage": "https://lensoftware.com/presentations/2018-05-28/"
You may also want to change the following lines in the App.css file to point to your server (or keep as is i.e. the Google Maps marker images will continue to be served from lensoftware.com):-
-webkit-mask: url("https://www.lensoftware.com/presentations/2018-05-28/assets/images/marker.svg") no-repeat center;
mask: url("https://www.lensoftware.com/presentations/2018-05-28/assets/images/marker.svg") no-repeat center;
Like any react app created with create-react-app
, to run in development mode:-
npm start
and to create a production build:-
npm run build