Search code examples
javascriptgoogle-mapsgoogle-maps-api-3gesturehtml2canvas

Remove "use two fingers..." warning on google maps with javascript


I have a web application written in javascript which uses the google maps api to map certain features. However, I am having some unwanted results when users with touchscreen computers try to use the map.

Specifically, I would like to get rid of the warning that tell users "use two fingers to move the map". Similiar to this picture (https://reyner.id/wp-content/uploads/Embedded%20Google%20Map%20Mobile%20Function.jpg)

The issue is due to the fact that when I take "screenshots" of the map (with html2canvas), the warning displays over the map and blocks the image. I think the easiest thing to do might be to disable that warning, but I can't find any documentation on how to do that.

Please let me know if it would help to include any codes or links.


Solution

  • you could use CSS to hide the message,

    .gm-style-pbc{
        display: none !important
    }