Google Maps Embed - Remove Place Card

后端 未结 3 995
死守一世寂寞
死守一世寂寞 2020-12-14 16:36

I\'m using the new Google maps embed code (iFrame) to add a small map to my website, but I can\'t hide the new address box in the top left corner (see image below).

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-14 17:30

    You can hide all buttons with css. Create a container div width overflow on hidden and the sizes you need. Place the new google maps iframe/embed inside with a largersize. To position the maps iframe use negative marges..

    Example with 100% width:

    Make the iframe 300px higher than your container div. 150px to hide below and 150px to hide on top. To hide this 150 on the top of the iframe use:

    margin-top: -150px;

提交回复
热议问题