google-maps-sdk-ios

EXC_BAD_ACCESS Using gmaps sdk 1.9.0, Xcode 6.4, running on 8.3 device

社会主义新天地 提交于 2019-12-03 14:20:37
I have 2 projects working with google maps sdk, they are currently in the Appstore. Things to have in mind: Gmaps sdk version 1.9.0 installed via cocoapods Xcode version 6.4 Deployment target 7.1 Device: iPhone 4s with 8.3.0 Today I've opened Xcode as usual with the first project, tried to compile and debug on the iPhone and I sometimes get a EXC_BAD_ACCESS (code=1...) crash on the app and sometime get EXC_BAD_ACCESS (code=EXC_ARM_DA_ALING...) , no stack trace in here, but always on main.m: return UIApplicationMain(argc, argv, nil, NSStringFromClass([TGPAppDelegate class])); Seeing the first

Google Maps API: Getting coordinates of current location iOS

微笑、不失礼 提交于 2019-12-03 13:04:51
I am currently working with Google Maps API in my project. I am trying to set the default camera/zoom to the users location. I do this: @implementation ViewController{ GMSMapView *mapView_; } @synthesize currentLatitude,currentLongitude; - (void)viewDidLoad { [super viewDidLoad]; mapView_.settings.myLocationButton = YES; mapView_.myLocationEnabled = YES; } - (void)loadView{ CLLocation *myLocation = mapView_.myLocation; GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = CLLocationCoordinate2DMake(myLocation.coordinate.latitude, myLocation.coordinate.longitude); marker.title = @

How to add a button on the Google maps in iOS?

穿精又带淫゛_ 提交于 2019-12-03 11:51:35
问题 I am new to iOS Programming and I have downloaded the google maps sdk for iOS and followed the instruction on their website ( as shown in this link https://developers.google.com/maps/documentation/ios/start ) and was able to get the map in my application. Now I am trying to add a button on the screen at the bottom over Google maps for giving an option to the user to go back to the previous screen. I just know that UIButton is a subclass of UIView and we can make a button appear on a view by

Search nearby in iOS Maps

自作多情 提交于 2019-12-03 09:07:21
I am trying to build a simple application using MapKit that will automatically search for a specific place when the app launches and drop pin(s) on the map at the locations(s). I am seeing all sorts of ways to load locations (lat/lon, etc), but nothing that lets me search for a specific business name, restaurant name, etc. I am expecting to work with Apple Maps. However, if Google Maps would be a better solve than so be it. Any help would be appreciated. Thanks iOS >= 6.1 provides MKLocalSearch , MKLocalSearchRequest to search for natural language points of interest. Sample

How to add marker for a map view in google maps sdk for ios in swift

北慕城南 提交于 2019-12-03 07:59:26
Trying to add a marker to Google map,but the app is getting crashed at while addMarker() function call,Exception details are as follows, Terminating app due to uncaught exception ' GMSThreadException ', reason: 'All calls to the Google Maps SDK for iOS must be made from the UI thread' FYI vwGogleMap is global and in a function I'm trying to plot marker. func addMarker() -> Void { var vwGogleMap : GMSMapView? var position = CLLocationCoordinate2DMake(17.411647,78.435637) var marker = GMSMarker(position: position) marker.title = "Hello World" marker.map = vwGogleMap } Any help would be

Controlling Animation Duration in Google Maps for iOS

限于喜欢 提交于 2019-12-03 06:41:55
问题 The documentation for Google Maps for iOS states that: Call one of several methods that allow you to animate the camera moving to a new location. You can control the duration of the animation with CoreAnimation. For the life of me, I can't figure out how to control the animation duration. I have tried using UIView animations, like: [UIView animateWithDuration: 5 animations:^{ GMSCameraPosition *camera = [self newCamera]; self.mapView.camera = camera; } completion:^(BOOL finished) { }]; And I

How do i animate GMSPolyline in google maps ios

妖精的绣舞 提交于 2019-12-03 06:36:10
I was using google maps SDK and I have to draw polyline when user moves, currently it just animates the marker only, path drawn before pin moves to specific location. I have to draw path and move pin at same time. Check this video : https://www.dropbox.com/s/q5kdjf4iq0337vg/Map_Sample.mov?dl=0 Here is my code func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { let location = locations.last! userPath.addCoordinate(location.coordinate) //userPath -> GMSMutablePath let polyline = GMSPolyline(path: userPath) polyline.strokeColor = UIColor(red: 0, green:

Building a Cocoapod with Swift and dependency on Objective-C framework

那年仲夏 提交于 2019-12-03 05:07:22
I know there are already a few questions on this theme here on SO, but very few have accepted answers, and I don't think I have found the exact same problem as mine. I'm building a Swift pod, and in my code I rely on the Google Maps iOS SDK, which is bundled as a .framework file. The project builds OK in Xcode, however I have troubles publishing the lib to Cocoapods. I managed to have a Podspec file that almost validates using the pod lib lint command. However, now that I've added the Google-Maps-iOS-SDK pod as a dependency in the Podspec file, it fails with the following message: $ pod lib

How to get coordinate center of gmsmapview in iphone

蹲街弑〆低调 提交于 2019-12-03 04:34:00
I'm using the new Google Maps SDK for iOS Can I get the true coordinate form GMSMapView.center? Now it returns a value of CGPoint, but it's not the true coordinate. Thank and Regards. I suggest to use [yourMapView.camera target] instead of Jing's solution. Jing's solution work fine on iOS 6, but maybe having issue on iOS 7/7.1, the projection may report wrong coordinate (a bit downward shift) ! I have checked the map bounds and padding is correct, both result of [projection pointForCoordinate: coordinate] and [projection coordinateForPoint:point] can contrast to each other, no ideas where the

How to add a button on the Google maps in iOS?

佐手、 提交于 2019-12-03 02:16:02
I am new to iOS Programming and I have downloaded the google maps sdk for iOS and followed the instruction on their website ( as shown in this link https://developers.google.com/maps/documentation/ios/start ) and was able to get the map in my application. Now I am trying to add a button on the screen at the bottom over Google maps for giving an option to the user to go back to the previous screen. I just know that UIButton is a subclass of UIView and we can make a button appear on a view by making it the sub view of that class. Previously iOS used to use Google Maps by default by MKMapView and