Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding position absolute onto the map container gets overwritten #316

Closed
deadlocked247 opened this issue Aug 4, 2016 · 6 comments
Closed

Comments

@deadlocked247
Copy link

Whenever I try to pass any position attribute into the styling for the container element, it gets overwritten by position: relative

@nodegin
Copy link

nodegin commented Oct 6, 2016

try adding !important after absolute

@aspehler
Copy link

aspehler commented Oct 13, 2016

I'm having the same issue, the mapElement div has a position: relative and the map does not show up on my page

Happen to me on 6.0.0 and 4.11.0 with Meteor and Bootstrap 3.3.6

It's possible to overcome the problem by putting the height of the map element in viewport height and not in percentage

mapElement={
   <div style={{ height: '100vh' }} />
}

@tomchentw
Copy link
Owner

@aspehler would it possible to put it in containerElement with v6.0.0 and still work? I'm asking because mapElement is the actual DOM that Google Maps JavaScript API will render its DOMs on, and containerElement is just a wrapper around it.

@aspehler
Copy link

@tomchentw yes it works too

containerElement={
   <div style={{ height: '100vh' }} />
}
mapElement={
   <div style={{ height: '100%' }} />
}

@tomchentw
Copy link
Owner

Thanks @aspehler for the feedback!

@nodegin @deadlocked247 did this solve your issue?

@tomchentw
Copy link
Owner

Please refer to Getting Help section in the README (or #469).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants