谷歌地图API的Android V2 - 应用覆盖的形状之外 [英] Google Map Android API v2 - Apply an overlay outside of a shape
问题描述
使用谷歌地图API的Android V2,我想申请一个形状之外的叠加。例如,我想提请形状围绕一个标记的应用灰色覆盖各地的这种形状。
Using Google Map Android API v2, I'm trying to apply an overlay outside of a shape. For example, I would like to draw a shape around a marker an apply a grey overlay all around this shape.
下面的结果,我想有: HTTP://www.hostingpics .NET / viewer.php?ID = 221191googlemap.png
Here the result I would like to have : http://www.hostingpics.net/viewer.php?id=221191googlemap.png
我知道如何绘制形状,我知道如何使用的GroundOverlay
类应用所有地图上的灰色覆盖,但我不知道如何申请覆盖所有的地图上,除了在造型。
I know how to draw a shape and I know how to apply the grey overlay on all the map using the GroundOverlay
class but I don't know how to apply the overlay on all the map except in the shape.
我真的希望有人可以帮我:)
I really hope that somebody will be able to help me :)
感谢你在前进!
推荐答案
您可以尝试在中间孔多边形叠加。即你的整个地图是由一个多边形不透明度值小于一粒铺上。可以在多边形的中间指定孔。见多边形覆盖的文件:
You can try polygon overlay with holes in the middle. i.e. your entire map is covered by a polygon with an opacity value less then one. You can specify holes in the middle of the polygon. See the documents of polygon overlay:
的http://developer.android.com/reference/com/google/android/gms/maps/model/Polygon.html
它说:
A polygon can be convex or concave, it may span the 180 meridian and it can have holes that are not filled in
这篇关于谷歌地图API的Android V2 - 应用覆盖的形状之外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!