Created
August 6, 2017 18:00
-
-
Save jackreichert/d170845fc9e9b003d950c930da4accf6 to your computer and use it in GitHub Desktop.
gist for issue submission
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import {connect} from 'react-redux'; | |
import {Map, Marker, GoogleApiWrapper} from 'google-maps-react'; | |
class EventMap extends Component { | |
constructor() { | |
super(); | |
this.styles = [ | |
{ | |
featureType: "all", | |
elementType: "all", | |
stylers: [ | |
{saturation: -100} | |
], | |
} | |
]; | |
this.dimensions = { | |
width: '421px', | |
height: '398px' | |
}; | |
} | |
render() { | |
return (<div className="events-map"> | |
<Map google={this.props.google} | |
zoom={3} | |
styles={this.styles} | |
style={this.dimensions} | |
disableDefaultUI={true}> | |
<Marker /> | |
</Map> | |
</div>); | |
} | |
} | |
export default connect()(GoogleApiWrapper({ | |
apiKey: (GMAPS_KEY) | |
})(EventMap)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
worked for me.