Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. import React from 'react';
  2. import ReactDOM from 'react-dom';
  3. import { Map, GoogleApiWrapper } from 'google-maps-react';
  4.  
  5. class MapContainer extends React.Component {
  6. render() {
  7. return (
  8. <Map
  9. google={this.props.google}
  10. zoom={14}
  11. style={{ height: '400px', width: '100%' }}
  12. />
  13. );
  14. }
  15. }
  16.  
  17. GoogleApiWrapper({
  18. apiKey: ('AIzaSyASleMBGWag47UNEILgIcMGkrqN66hbxuk')
  19. })(MapContainer)
  20.  
  21. class App extends React.Component {
  22. render() {
  23. return (
  24. <MapContainer google={window.google} />
  25. )
  26. }
  27. }
  28.  
  29. document.addEventListener('DOMContentLoaded', () => {
  30. ReactDOM.render(
  31. <App />,
  32. document.getElementById('app')
  33. )
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement