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

New zoom helping overlay doesn't render properly #399

Open
jonadeline opened this issue Sep 21, 2017 · 2 comments
Open

New zoom helping overlay doesn't render properly #399

jonadeline opened this issue Sep 21, 2017 · 2 comments

Comments

@jonadeline
Copy link

jonadeline commented Sep 21, 2017

Since the last release of the Google Maps API, a new (useful) overlay has appeared to indicate that user have to press CMD and use the mouse wheel to zoom the map.

It should render like this (sorry it's in french) :
image

But when using the google-mapelement, we've got this :
image
Just the text shows-up in a basic font and behind controls button.

Here is a jsbin to reproduce if needed :
https://jsbin.com/qiboluq/edit?html,console,output

@ThomasOrlita
Copy link

Workaround to make it work:

<google-map on-google-map-idle="mapIdle">
mapIdle(event) {
    event.target.shadowRoot.querySelector('.gm-style-pbc').setAttribute('style', 'z-index: 2;position:absolute;height:100%;width:100%;padding:0px;border-width:0px;margin:0px;left:0px;top:0px;opacity:0;transition:opacity ease-in-out;background-color:rgba(0,0,0,0.45);text-align:center');
    event.target.shadowRoot.querySelector('.gm-style-pbt').setAttribute('style', 'font-size:22px;color:white;font-family:Roboto,Arial,sans-serif;position:relative;margin:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)');
}

@jonadeline
Copy link
Author

Thx @ThomasOrlita. Works great.

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

2 participants