UNPKG

@syncromatics/react-google-maps

Version:
33 lines (29 loc) 650 B
### Map with a Marker ```jsx const { compose } = require("recompose"); const { withScriptjs, withGoogleMap, GoogleMap, Marker, } = require("@syncromatics/react-google-maps"); const MapWithAMarker = compose( withScriptjs, withGoogleMap )(props => <GoogleMap defaultZoom={8} defaultCenter={{ lat: -34.397, lng: 150.644 }} > <Marker position={{ lat: -34.397, lng: 150.644 }} /> </GoogleMap> ); <MapWithAMarker googleMapURL={GOOGLE_MAP_URL} loadingElement={<div style={{ height: `100%` }} />} containerElement={<div style={{ height: `400px` }} />} mapElement={<div style={{ height: `100%` }} />} /> ```