google-maps-sdk-ios

Wrong polyline drawing on map with Google Maps SDK

喜夏-厌秋 提交于 2019-12-01 00:43:41
I'm trying to draw route on my map using Google Maps SDK. This is the URL that i'm calling and I parse the JSON response to array of coordinates: id jsonResponse = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil]; int points_count = 0; points_count = [[[[[[jsonResponse objectForKey:@"routes"] objectAtIndex:0] objectForKey:@"legs"] objectAtIndex:0] objectForKey:@"steps"] count]; NSArray *steps = nil; if (points_count && [[[[jsonResponse objectForKey:@"routes"] objectAtIndex:0] objectForKey:@"legs"] count]) { steps = [[[[[jsonResponse

how to override/swizzle a method of a private class in runtime objective-c?

邮差的信 提交于 2019-12-01 00:31:52
To give a bit of context of why I'm asking this: basically I would like to change the location of the myLocationButton of the google map on iOS. So I first fetch the actual button like so: @implementation GMSMapView (UIChanges) - (UIButton *)myLocationButton { UIButton *myLocationButton; for (myLocationButton in [settingView subviews]) { if ([myLocationButton isMemberOfClass:[UIButton class]]) break; } return myLocationButton; } Then I try to change it's position in the screen using NSLayoutConstraints (directly changing values of the frame property of the button does nothing with google maps

Google Map flickering in iOS

纵饮孤独 提交于 2019-11-30 21:12:47
I am using Google Maps SDK for iOS version: 1.10.17867.0 in my app via pod. But when I initialise the map at a particular position, all the titles and map starts flickering. Example Code (swift): import UIKit import GoogleMaps class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.whiteColor(); var camera = GMSCameraPosition.cameraWithLatitude(19.0176147, longitude: 72.8561644, zoom:18) // even try this: 28.6469655, longitude: 77.0932634, zoom:10 var mapView = GMSMapView.mapWithFrame(CGRectZero, camera:camera) var marker =

how to draw a path one place to another place in google map sdk iOS?

社会主义新天地 提交于 2019-11-30 20:12:59
i need to find path in google map view one place to another place. how to draw a direction map using google map sdk iOS. can any of give source code. and then explain how to achieve this. Below i attached image also, i need to achieve this in iPhone app using Google Map SDK iOS. Thanks, -(void)showRoute:(id)routeDict { NSString *pointStr = [[[[routeDict objectForKey:@"routes"] objectAtIndex:0] objectForKey:@"overview_polyline"] objectForKey:@"points"]; float max_long = 0.0; float min_long = 0.0; float max_lat = 0.0; float min_lat = 0.0; NSMutableArray *routeArr = [self decodePolyLine:pointStr]

how to override/swizzle a method of a private class in runtime objective-c?

半城伤御伤魂 提交于 2019-11-30 19:43:46
问题 To give a bit of context of why I'm asking this: basically I would like to change the location of the myLocationButton of the google map on iOS. So I first fetch the actual button like so: @implementation GMSMapView (UIChanges) - (UIButton *)myLocationButton { UIButton *myLocationButton; for (myLocationButton in [settingView subviews]) { if ([myLocationButton isMemberOfClass:[UIButton class]]) break; } return myLocationButton; } Then I try to change it's position in the screen using

xCode 7 error: include of non-modular header inside framework module with Google Maps

六月ゝ 毕业季﹏ 提交于 2019-11-30 17:29:38
I updated to xCode 7.1 today and tried to build my app but I'm getting this error: I have already tried going to Build Settings under "Target" and set "Allow Non-modular Includes in Framework Modules" to YES but that didn't solve this issue. UPDATE: Since this was preventing me from compiling and hindering my progress in terms of development, I recommend you download an older version of xCode from Apple ( https://developer.apple.com/downloads/ make sure to login). You can download version 7.0.1 from the link and at least continue development. This is what I've done and I can continue

Switch Google Maps SDK & Mapkit in the same app cause crash

删除回忆录丶 提交于 2019-11-30 15:58:20
I created a pretty simple app that uses MapKit and GoogleMaps frameworks and tried to switch between the two maps. I am using ARC (ios 6.1) and Google Maps SDK for iOS version: 1.1.1.2311. After a couple of switches the app crashes with [EAGLContext setCurrentContext:] – always in the MapKit code. There was some suggestions in a previous thread - to try setting [EAGLContext setCurrentContext:nil] at various places but it doesn’t help. stack trace: Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000c Crashed Thread: 0 Thread 0 name: Dispatch queue: com

How to track a user's location and display the path travelled using Google Maps ios SDK

£可爱£侵袭症+ 提交于 2019-11-30 15:44:14
问题 I'm currently building an ios app and I'm hoping to implement a function where the user's location is displayed on a Google Map view and when they move a polyline show's the path that has been travelled by the user so far. This obviously needs to happen in realtime. So far I've initialised a Google Maps view and can display the user's current location using the observeValueForKeyPath function. The view and location marker update as the user moves. I figured the best way to do this would be to

Google Maps SDK for iOS doesn't display map content

别等时光非礼了梦想. 提交于 2019-11-30 14:57:03
问题 I'm using the current version 1.1.2 of Google Maps SDK for iOS. The map only displays the Google logo, the current location and the added marker. But no map content whatsoever: I correctly registered the API key: BOOL result = [GMSServices provideAPIKey:@"<my key>"]; the result is YES and I verified that the bundleIdentifier matches with the API console. I load the GMSMapView from a storyboard and set the camera in my -viewDidLoad : self.mapView.camera = [GMSCameraPosition cameraWithLatitude

GMSMapView myLocation not giving actual location

女生的网名这么多〃 提交于 2019-11-30 13:58:28
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 a nil CLLocation, consequentially cameraWithLatitude:longitude:zoom: get 0 0 coordinates and displays