2013-03-15 59 views

回答

8

我不知道为什么你记下来,因为我有同样的问题。 经过许多研究和Saxon Druce的回答,我已经看到了Android SDK上的Circle,但在iOS中没有。

---编辑---

有2个解决方案,在这里: How to display a circle in GMSMapView

--- EDIT 2 ----

由于他的版本1.2.1(2013年4月23 ),Google Maps SDK for iOS会在他的Shapes中计算一个GMSCircle。

现在可以得出这样的:

CLLocationCoordinate2D circleCenter = CLLocationCoordinate2DMake(37.35, -122.0); 
GMSCircle *circ = [GMSCircle circleWithPosition:circleCenter 
             radius:1000]; 

circ.fillColor = [UIColor colorWithRed:0.25 green:0 blue:0 alpha:0.05]; 
circ.strokeColor = [UIColor redColor]; 
circ.strokeWidth = 5; 
circ.map = mapView; 

here

+0

您好!不幸的是,我没有找到解决方案,所以我绘制了具有大量顶点的多边形。仍然希望谷歌在下一版SDK中集成这个功能 – hex 2013-03-21 08:16:36

+0

是的,它的计划...但是当... – 2013-03-21 11:46:39

+4

从现在起谷歌地图sdk for ios有圆圈类! https://developers.google.com/maps/documentation/ios/shapes?hl=ru – hex 2013-04-24 07:26:50