2013-02-13 71 views
0

我想在Google地图V2中绘制圆圈。我曾尝试使用地面覆盖物,但没有显示,因为我想。在Google地图V2 API上绘制多个圆圈

+2

请显示一些代码。或使用https://developers.google.com/maps/documentation/android/lines#polygons – n3utrino 2013-02-13 11:33:14

+0

当我使用V1地图,然后我使用projection.toPixels(mGeoPoint,mScreenCoords); ,我想知道在V2地图中替换这个投影。 – Anks 2013-02-13 12:25:48

+0

请参阅http://stackoverflow.com/questions/13991301/android-maps-api-v2-draw-circle – zmeda 2013-02-27 09:09:39

回答

-1

您可以添加一个圆谷歌地图的广告如下:

GoogleMap gMap = ...; //get ref to gMap 
    CircleOptions circleOptions = new CircleOptions(); 
    circleOptions.center(latLang point); 
    circleOptions.fillColor(/* add fill color here */); 
    circleOptions.strokeColor(/* add stoke color here*/); 
    circleOptions.strokeWidth(/* stroke width here*/); 

    Circle circle = this.getMap().addCircle(circleOptions); 

您以后可以使用这个圈子对象,如果你想从地图中删除。

+0

我可以知道为什么downvote? – rajankz 2016-07-08 21:06:31

相关问题