I am trying to put a Google MapView in a UIView , but I can’t see anything.
My code
*. H
* m.
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86 longitude:151.20 zoom:6]; self.mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; self.mapView_.myLocationEnabled = YES; self.mapView = self.mapView_;
Thanks.
Decision
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86 longitude:151.20 zoom:6]; // Indicating the map frame bounds self.mapView_ = [GMSMapView mapWithFrame:self.mapView.bounds camera: camera]; self.mapView_.myLocationEnabled = YES; // Add as subview the mapview [self.mapView addSubview: self.mapView_];
So, I got a solution. Anyway, thanks.
Sincerely.
ios uiview google-maps-sdk-ios
Սամվել Պետրոսյան
source share