如何在带有蒙版的div中插入googlemap [英] How to insert a googlemap in a div with mask
问题描述
我需要将Google地图放入div。
这里没问题...问题是我需要掩盖这个div。
我需要一个可以导航的循环谷歌地图!
i need to put a google map into a div. No problem here...the problem is that i need to mask this div. I need to have a circular google map that i can navigate!
我试试
帮助请问?
I try Help pls?
推荐答案
,请创建一个 Polygon ,其中涵盖除圈子以外的所有内容。
With the Maps API, create a Polygon that covers everything except the circles.
要创建一个在每个缩放级别都不显示线段的圆是具有挑战性的,但应该可以使用合理的圆形外观进行近似。
To create a circle that doesn't show line segments at every zoom level is challenging, but an approximation with a reasonable circular look should be possible.
作为替代方案,您可以扩展OverlayView类以创建自定义叠加类型,以显示具有更平滑边缘的圆。但这将是更多的工作。
As an alternative you could extend the OverlayView class to create a custom overlay type that show a circle with smoother edges. But this would be more work.
这篇关于如何在带有蒙版的div中插入googlemap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!