1

I am adding my map view like

mapView_ = [[GMSMapView alloc]initWithFrame:_viewMapContainer.bounds];
mapView_.myLocationEnabled = YES;
mapView_.frame = _viewMapContainer.bounds;
[_viewMapContainer addSubview: mapView_];

In my application this view is only for displaying the whole map of the world and some markers. I am unable to display the whole world in one view.Any help will be appreciable ,I don't want the user interactions on it

Jeff
  • 1,405
  • 3
  • 26
  • 46

1 Answers1

2

I have also faced this problem

- (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]];
}

Please try this and share the response.

happy coding :)

Shubham Narang
  • 514
  • 2
  • 14
  • Thak you for your reply.Above code is for showing all markers in visible area. Actually what i want is to display full world map in the view – Jeff Oct 01 '15 at 11:20