您的位置:首页 > 移动开发 > IOS开发

ios googlemaps 开发 设置地图可见所有大头针

2016-03-07 14:23 381 查看
- (void)focusMapToShowAllMarkers
{

GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] init];

for (GMSMarker *marker in <An array of your markers>)
bounds = [bounds includingCoordinate:marker.position];

[<yourMap> animateWithCameraUpdate:[GMSCameraUpdate fitBounds:bounds withPadding:30.0f]];

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: