Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

New zoom helping overlay doesn't render properly #399

Description

@jonadeline

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

Activity

  1. ThomasOrlita commented on Nov 17, 2017

    @ThomasOrlita

    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%)');
    }
    
  2. jonadeline commented on Nov 19, 2017

    @jonadeline
    Author

    Thx @ThomasOrlita. Works great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions