how to add google map in react js
npm i -S @react-google-maps/apiimport React, { Component } from 'react';import GoogleMapReact from 'google-map-react'; const AnyReactComponent = ({ text }) => <div>{text}</div>; class SimpleMap extends Component { static defaultProps = { center: { lat: 59.95, lng: 30.33 }, zoom: 11 }; render() { return ( // Important! Always set the container height explicitly <div style={{ height: '100vh', width: '100%' }}> <GoogleMapReact bootstrapURLKeys={{ key: /* YOUR KEY HERE */ }} defaultCenter={this.props.center} defaultZoom={this.props.zoom} > <AnyReactComponent lat={59.955413} lng={30.337844} text="My Marker" /> </GoogleMapReact> </div> ); }} export default SimpleMap;
Also in JavaScript:
- smtpjs cdn
- js array sum
- rorate array
- Merging Or Copying Arrays Using Spread Operator
- javascript fuzzy search
- return an array of strings from an array of objects js
- set navigation drawer to open by default react native
- js entries
- react native routes
- airbnb react native eslint
- how to create a smooth effect in javasript
- usb react native device not found
- what is javascript token
- javascript genreate number id
- js multiple try catch
- add class to html tag javascript
- make string json object vue
- jquery wrap inner text
- w3schools angular
- Error: Could not symlink include/node/common.gypi /usr/local/include/node is not writable.
- javascript floor
- create react element with string
- server info discord.js
- javascript check if text is overflowing