我使用适用于iOS的Google Map SDK在MapView上绘制圆圈。
CLLocationCoordinate2D circleCenter = CLLocationCoordinate2DMake(60,90);
GMSCircle *circ = [GMSCircle circleWithPosition:circleCenter
radius:8000000];
circ.strokeColor = [UIColor blueColor];
circ.zIndex = 23;
circ.fillColor = [UIColor colorWithWhite:1 alpha:0.7];
circ.strokeWidth = 2;
circ.map = mapView_;
在输出中,它不会遮挡圆形区域中的区域
在谷歌地图API上使用相同的纬度和长度(中心)绘制javascript时,它会遮挡圆圈中的所有区域。替换链接中的以下代码。
var amsterdam=new google.maps.LatLng(60,90);
var myCity = new google.maps.Circle({
center:amsterdam,
radius:8000000,
strokeColor:"#0000FF",
strokeOpacity:0.8,
strokeWeight:2,
fillColor:"#0000FF",
fillOpacity:0.4
});
问题是如何在Google Map SDK for iOS中绘制圆圈,例如javascript API,它会遮蔽圆圈中的所有区域?