Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import ReactDOM from 'react-dom';
- import { Map, GoogleApiWrapper } from 'google-maps-react';
- class MapContainer extends React.Component {
- render() {
- return (
- <Map
- google={this.props.google}
- zoom={14}
- style={{ height: '400px', width: '100%' }}
- />
- );
- }
- }
- GoogleApiWrapper({
- apiKey: ('AIzaSyASleMBGWag47UNEILgIcMGkrqN66hbxuk')
- })(MapContainer)
- class App extends React.Component {
- render() {
- return (
- <MapContainer google={window.google} />
- )
- }
- }
- document.addEventListener('DOMContentLoaded', () => {
- ReactDOM.render(
- <App />,
- document.getElementById('app')
- )
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement