Google-maps-react: div wrapping map style

Created on 23 Dec 2018  路  5Comments  路  Source: fullstackreact/google-maps-react

When ever I check the map element I see an outer div surrounding it. I want to change that div style.
How can I do that?

Most helpful comment

Any updates on this? It's very frustrating when you want to have map adopt to the styles of its parent.

All 5 comments

Same problem, and when I put the containerStyle={{width: '100%', height: '250px', position: 'relative'}} mentioned by other people my map does not load

I had a similar issue, setting `containerStyle={{position:'static'}} did work for me. See https://stackoverflow.com/questions/53970359/anchor-link-under-map-component-not-clickable/53972516#53972516 . Hope it helps

Any solution on this issue?

Any updates on this? It's very frustrating when you want to have map adopt to the styles of its parent.

Guys, it took too much time to be fixed this and I've forked and created my own version to fixed. I've also opened a pull request on this repo, let's see if they'll merge it, eventually.

The pull request:
https://github.com/fullstackreact/google-maps-react/pull/483

My branch with the fix:
https://github.com/bertuz/google-maps-react/tree/stylized-div-wrapper

My branch with built files, in order to use it with npm (or yarn or whatever):
https://github.com/bertuz/google-maps-react/tree/wrapping-div-with-styles

To use it directly you can add it like this:

yarn add "https://github.com/bertuz/google-maps-react.git#v2.0.7-alpha.1"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

colshacol picture colshacol  路  4Comments

antonk52 picture antonk52  路  5Comments

EmmaU25 picture EmmaU25  路  3Comments

cernoel picture cernoel  路  3Comments

ahlag picture ahlag  路  4Comments