Clip Google Maps JS API ImageMapType to a polygon

后端 未结 6 1689
梦毁少年i
梦毁少年i 2021-02-04 23:21

How can I clip a MapType in Google Maps to an arbitrary polygon. For example, if I have a custom ImageMapType that covers a large area (i.e. all the world), but I want to show i

6条回答
  •  我在风中等你
    2021-02-04 23:58

    You could place a DIV above your map, with absolute positioning and high z-index. then, apply a polygon mask to that DIV like this: -webkit-clip-path: polygon(0 0, 0 100%, 100% 0);

提交回复
热议问题