google-maps-sdk-ios

iOS, How to use GMSCoordinateBounds to show all the markers of the map?

家住魔仙堡 提交于 2019-11-29 20:45:36
I want to show all the markers that are on my map, after doing some searches I found that it should be done with GMSCoordinateBounds (Google Maps SDK) I've read the official documentation about it, but I have not understand how to use it and implement it in my code. https://developers.google.com/maps/documentation/ios/reference/interface_g_m_s_camera_update#aa5b05606808272f9054c54af6830df3e Here is my code GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] init]; CLLocationCoordinate2D location; for (NSDictionary *dictionary in array) { location.latitude = [dictionary[@"latitude"]

GMSMapView myLocation not giving actual location

≯℡__Kan透↙ 提交于 2019-11-29 19:59:34
问题 I have a GMSMapView properly loaded and working inside my viewcontroller what i'm not being able to do is setting the GMSCameraPosition around my location this is my code: mapView_.myLocationEnabled = YES; CLLocation* myLoc = [mapView_ myLocation]; GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:myLoc.coordinate.latitude longitude:myLoc.coordinate.longitude zoom:4]; [mapView_ setCamera:camera]; GPS is enabled and application has all needed permissions but myLocation returns

For google maps iOS sdk, current location occasionally gets plotted at 0,0

自作多情 提交于 2019-11-29 18:07:07
Not sure why this happens but when it does we'd prefer not to show the user that their current location is 0,0 (it's in the middle of the ocean off the coast of South Africa). Is there any way to detect when this happens so we can show an error message or something to the user? Looks like you are not authorized to access the current location of the device. For that, you'll have to add these two keys into your plist: NSLocationAlwaysUsageDescription NSLocationWhenInUseUsageDescription Now when you're done with with it, you will have to request for authorization like this : if ([locationManager

-convertPoint:toCoordinateFromView: method for Google Maps SDK for iOS [closed]

北城余情 提交于 2019-11-29 15:22:15
How do I implement the MapKit method [googleMapView convertPoint:nePoint toCoordinateFromView:pinView]; in Google Maps SDK for iOS? You could use something like this: GMSMapView* mapView = ...; CGPoint point = ...; ... CLLocationCoordinate2D coordinate = [mapView.projection coordinateForPoint: point]; In this case point should be relative to the map view. If you have a point relative to another view (eg pinView in your case), you'd need to convert that into a point relative to the map view first. You could do that with the following: UIView* pinView = ...; CGPoint pinViewPoint = ...; ...

Undefined symbols for architecture armv7 while using Google-Maps-iOS-SDK (1.8.1)

梦想与她 提交于 2019-11-29 14:39:45
问题 I am trying to add Google-Maps-iOS-SDK (1.8.1) using cocoapods (0.33.1) . Deployment target version: iOS 7.0 I have added this pod: pod 'Google-Maps-iOS-SDK' , '~> 1.8' Downloaded and installed sdk properly. I started adding header file and sample map view loading code from here. I have properly added API keys. In one view controller's - (void)viewDidLoad , I have added following code: // Create a GMSCameraPosition that tells the map to display the // coordinate -33.86,151.20 at zoom level 6.

how to get current location in google map sdk in iphone

心不动则不痛 提交于 2019-11-29 11:21:37
I want to set camera on current location and zoom level upto 10. So I have written code like this and for current location i get hint from this post. How to use delegates in Google map API for IOS 6 here is my code mapView_=[[GMSMapView alloc]initWithFrame:CGRectZero]; CLLocationCoordinate2D currentPosition = mapView_.myLocation.coordinate; GMSCameraPosition* camera = [GMSCameraPosition cameraWithTarget: currentPosition zoom: 10]; mapView_.camera = camera; mapView_.delegate=self; mapView_.mapType = kGMSTypeSatellite; mapView_.myLocationEnabled = YES; self.view = mapView_; mapView_.settings

Google Maps SDK for iOS trying to run on iOS 4.3

丶灬走出姿态 提交于 2019-11-29 11:18:05
I successfully integrated the sdk with my app. My app is intended to run with Google Maps sdk for iOS6 , and with Apple UIMapKit for iOS 4.3 and 5.x . Since I added the google maps framework, ios 4.3 won't run anymore. I changed the GLKit.framework and GoogleMaps.framework to "optional", and I get dyld: Symbol not found: _NSFileProtectionCompleteUntilFirstUserAuthentication before the app even starts. need your help :-) My app runs okay on iOS 4.3, with GLKit.framework and GoogleMaps.framework set to optional, and if I remove all calls to the Google API. Could the reference to

GoogleMapsSDK : Undefined symbols for architecture x86_64

ぃ、小莉子 提交于 2019-11-29 11:10:12
问题 I am trying to install the Google maps SDK and I am running through this error when running: Undefined symbols for architecture x86_64: "_CBAdvertisementDataManufacturerDataKey", referenced from: -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o) "_CBAdvertisementDataServiceDataKey", referenced from: -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o) "

Customize Google Maps blue dot for current location

只愿长相守 提交于 2019-11-29 09:42:29
I'm using a 2013 version of Google Maps SDK for iOS. I would like to customize the default blue dot for current location with another icon or pulsing circles around. I know we can do that with mapView:viewForAnnotation: in MKMapView, but I can't found out how to do it with Google Maps. There is no way to do this with current version of the SDK (1.4.3), and actually there is an open issue with this request: Look here . As a work around, you can hide the default button with: _map.myLocationEnabled = NO; Then create a custom GMSMarker GMSMarker *pointMarker = [GMSMarker markerWithPosition

error unrecognized selector sent to class while adding Google Map SDK to iOS6

让人想犯罪 __ 提交于 2019-11-29 09:21:55
This is a single view application and I followed the instruction given at link https://developers.google.com/maps/documentation/ios/start for adding google map SDK to iOS6. ERROR Is: unrecognized selector sent to class 0xe2b0 2013-02-07 15:21:29.788 mapApp[2061:12e03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[GMSCameraPosition cameraWithLatitude:longitude:zoom:]: unrecognized selector sent to class 0xe2b0' AppDelegate.m - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [