fix map not showing up when first initialized without a height#323
fix map not showing up when first initialized without a height#323rbellens wants to merge 1 commit intoGoogleWebComponents:masterfrom
Conversation
fix map not showing up when first initialized without a height
|
This shouldn't be needed. These styles are within shadow dom. Can you post a jsbin that repos the issue you're seeing? |
|
In my webapp that commit just solved my problem with two Here is an example for that problem (without the api-code for google-map) |
|
I have the same problem here. Could we merge and release that? After resizing (opening Chrome Developer tools is enough), the map is rendered correctly. I already added the following, but nothing happens: The event is fired, but nothing happens... Even when I add a paper-button with onClick event, the map is rendered correctly afterwards: |
|
There's workarounds posted in #259 (comment) on how to resize the map with iron-pages. One good technique is to wrap |
When the map is initialized and the element has no height (
clientHeight=0), e.g. when one of the parents are not yet attached, the map will never show up. This is because google maps adds aposition: relativeto the style of the map element. Calling, the notifyResize will not help in this case. Forcing absolute position, fixes this problem (notifyResize is still needed).