Ios GMSMapView显示全球地图?
我正在添加我的地图视图,如Ios GMSMapView显示全球地图?,ios,google-maps,gmsmapview,Ios,Google Maps,Gmsmapview,我正在添加我的地图视图,如 mapView_ = [[GMSMapView alloc]initWithFrame:_viewMapContainer.bounds]; mapView_.myLocationEnabled = YES; mapView_.frame = _viewMapContainer.bounds; [_viewMapContainer addSubview: mapView_]; 在我的应用程序中,此视图仅用于显示整个世界地图和一些标记。我无法在一个视图中显示整个世界。
mapView_ = [[GMSMapView alloc]initWithFrame:_viewMapContainer.bounds];
mapView_.myLocationEnabled = YES;
mapView_.frame = _viewMapContainer.bounds;
[_viewMapContainer addSubview: mapView_];
在我的应用程序中,此视图仅用于显示整个世界地图和一些标记。我无法在一个视图中显示整个世界。任何帮助都将是可观的,我不希望在它上进行用户交互我也面临着这个问题
- (void)focusMapToShowAllMarkers
{
CLLocationCoordinate2D myLocation = ((GMSMarker *)_markers.firstObject).position;
GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] initWithCoordinate:myLocation coordinate:myLocation];
for (GMSMarker *marker in _markers)
bounds = [bounds includingCoordinate:marker.position];
[_mapView animateWithCameraUpdate:[GMSCameraUpdate fitBounds:bounds withPadding:15.0f]];
}
请尝试此选项并共享响应
快乐编码:)谢谢您的回复。以上代码用于显示可见区域中的所有标记。实际上,我想要的是在视图中显示完整的世界地图