GoogleWebComponents / google-streetview-pano

Google Maps Street View web component
http://googlewebcomponents.github.io/google-streetview-pano
Other
33 stars 27 forks source link

StreetView panorama does not render in Shadow DOM #19

Open stillgbx opened 8 years ago

stillgbx commented 8 years ago

Description

StreetView panorama does not render in Shadow DOM. Rendering is ok in Shady DOM.

Expected outcome

The StreetView panorama.

Actual outcome

Nothing, the "map" div seems to be deleted. capture d ecran de 2016-07-15 12 02 32

Live Demo

https://jsbin.com/quyaji/edit?html,output

Steps to reproduce

The same result occurs when using google-map custom element and switching to StreetView, with the default control or programmatically.

stillgbx commented 8 years ago

see also https://github.com/GoogleWebComponents/google-map/issues/314

robdodson commented 7 years ago

I think this might be a Maps API issue and have reached out to the team to see about getting https://code.google.com/p/gmaps-api-issues/issues/detail?id=11109 reopened

robdodson commented 7 years ago

Looks like https://code.google.com/p/gmaps-api-issues/issues/detail?id=11109 has been marked as Accepted and the team is now working on it. The bug is because the Maps API needs to measure the node ahead of time but it can't tell that the node is connected to the DOM already (it's using document.contains(), which doesn't cross the shadow boundary) so it attaches the node to the DOM itself but after doing so it's unable to insert it back into the Shadow DOM. Looks like there may be a solution but they're still working on it. I'd suggest subscribing to that CRBug for updates.

ebidel commented 7 years ago

It looks like this is marked as fixed internally. Not sure when that will actually land in a maps api v3 release though.

robdodson commented 7 years ago

Looks like this is fixed if we switch to the v3 experimental api https://code.google.com/p/gmaps-api-issues/issues/detail?id=11109