Open fdurmaz opened 6 years ago
DId you try: defaultOptions={{ styles: this.props.styles }}
?
options
accepts an object, you are probably passing the mapStyles array directly, without key.
@johanlef I've tried. Nothing works..
mapStyles.js
:
export default [
{
elementType: "geometry",
stylers: [
{
color: "#f5f5f5",
},
],
},
// ...
];
import styles from "./mapStyles";
<GoogleMapReact
bootstrapURLKeys={{ key: GOOGLE_MAPS_API_KEY }}
options={{ styles }}
>
{/* your markers */}
</GoogleMapReact>
or options={{ styles: styles }}
works perfectly :)
Hello,
I'm using the Custom Styling Wizard to get the silver style map. However, when I try to implement the JSON file to my project, it doesn't work.
This is my file: