2013-02-13 72 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

相關問題