Google Maps W/ React easy guide

npm i -S @react-google-maps/api
import { GoogleMap, LoadScript, Marker } from '@react-google-maps/api';
const containerStyle = {width: '400px',height: '400px'};const center = {lat: 3.43722,lng: -76.5225};
return (<div className="App">
<h1> This is a google map!</h1>
<LoadScriptgoogleMapsApiKey={KEY}>
<GoogleMapmapContainerStyle={containerStyle}center={center}zoom={10}>
{ /* Child components, such as markers, info windows, etc. */ }<Marker position={center}></Marker>
</GoogleMap>
</LoadScript>
</div>);

Santiago Toro

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store