google-maps-sdk-ios

GoogleMaps SDK classes undeclared type or unresolved identifier

萝らか妹 提交于 2019-12-10 08:06:04
问题 I am using cocoapods to import libraries. I just updated my pods and since then some of the GoogleMaps SDK classes are not available anymore. For example GMSAutocompletePrediction or GMSPlacesClient labeled as "use of undeclared type" and "use of unresolved identifier". I have tried to remove the GoogleMaps pods and then to reinstall it but it didnt work. Even though, some classes are still usable, like GMSAddress for example. I noticed that GoogleMaps was not one of the target in the Pods

GMSMarker opacity animation not repeating

回眸只為那壹抹淺笑 提交于 2019-12-09 12:06:43
问题 I'm trying to make a GMSMarker with a custom icon blink with a decaying animated opacity. The animation should repeat itself for a few times, but it does not, it just performs one transition and then it stops. This only happens when animating the opacity property, it works fine when animating other properties. Here is the code: GMSMarkerLayer* layer = marker.layer; CABasicAnimation *blink = [CABasicAnimation animationWithKeyPath:@"opacity"]; blink.fromValue = [NSNumber numberWithFloat:0.0];

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

◇◆丶佛笑我妖孽 提交于 2019-12-09 06:59:29
问题 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

How to draw routes between two locations in google maps iOS swift

半腔热情 提交于 2019-12-09 04:26:18
问题 I'm using google maps in my iOS swift project. I want to draw a path between two locations on the map (Not straight line). Any idea how to do that ? 回答1: To draw polyline between two locations on Google Map in Swift. // Pass your source and destination coordinates in this method. func fetchRoute(from source: CLLocationCoordinate2D, to destination: CLLocationCoordinate2D) { let session = URLSession.shared let url = URL(string: "http://maps.googleapis.com/maps/api/directions/json?origin=\

Increase in app size after use of Google Maps SDK for iOS

女生的网名这么多〃 提交于 2019-12-08 20:06:45
问题 I tried using the Google Maps SDK for iOS and it seems to add a considerable amount of size (96MB) to our app, which is currently only at 26MB (using the Apple maps). I would apprecaiate any feedback/experience on how to resolve. 回答1: There isn't a way to resolve this. Its one of the cons of working with Google Maps SDK vs Apple maps. Google Maps SDK is its own static framework that isn't preloaded on the device. Apple Maps are build into the OS as a dynamic framework. Another Possibility:

Google Maps markers not removing iOS

半城伤御伤魂 提交于 2019-12-08 12:53:22
问题 I'm running a thread to fetch drivers location every 10 seconds and want to remove the added markers from the map but it doesn't work.. My code: -(void)APiResponse:(id)returnJson { [googleMapsDriverPin setMap:nil]; googleMapsDriverPin = nil; NSMutableArray *driverPins = [[NSMutableArray alloc]init]; for (int x = 0; x < [[returnJson valueForKey:@"drivers"] count]; x++) { CLLocation *driverLocations = [[CLLocation alloc]initWithLatitude:[[[[returnJson valueForKey:@"drivers"] objectAtIndex:x]

Use GOOGLE maps in iOS supporting iOS 6 and also iOS 5

痴心易碎 提交于 2019-12-08 12:51:29
I am in a need of having maps support for an app, but the concern is prior to ios 6 the iOS mapKit uses the google maps which is rich in content, but in iOS 6 its using its own maps which is not that rich in content. I have search for the Google API for ios 6, which is great but I need to support prior to ios 6 also. Please help. The new Google Maps SDK for iOS supports back to iOS 5.1, see here: https://developers.google.com/maps/documentation/ios/intro#supported_platforms 来源: https://stackoverflow.com/questions/15127806/use-google-maps-in-ios-supporting-ios-6-and-also-ios-5

Resize, drag and scale GMSCircle in Google map objective-c

China☆狼群 提交于 2019-12-08 06:29:54
问题 Helllo Everyone, In google map i need to show a circle and user can resize it, scale it and drag it also and after that i need to find radius of the circle and center latitude and longitude. How can i achieve this ? 回答1: For Tappable GMSCircle set googleMapCircle.tappable = true; And to achieve draggable circle need to add the delegate method of Google map didTapOverlay : - (void)mapView: (GMSMapView*)mapView didChangeCameraPosition: (GMSCameraPosition*)position { //set GMSCameraPosition to

Parse and GMaps iOS SDK incompatibility in Swift?

旧时模样 提交于 2019-12-08 05:43:51
问题 I'm building a Swift app w/ Parse integration, which works correctly. When I try to add Google Maps iOS SDK integration, however, I get the following build errors: Undefined symbols for architecture x86_64: "_FBTokenInformationExpirationDateKey", referenced from: -[PFFacebookTokenCachingStrategy cacheTokenInformation:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o) -[PFFacebookTokenCachingStrategy expirationDate] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o) -

how to calculate angle between two path lines on google map using lat-long coordinates

被刻印的时光 ゝ 提交于 2019-12-08 04:55:19
问题 I want to calculate angle between two path lines on Google map. I have the lat-long coordinates of the end points of the lines. Please suggest If there is other information I can use to do this that is available from Google maps. 回答1: If the distances are small you can use this method. The accuracy reduces with large distances and the further you move from the equator. First find bearings with computeHeading() computeHeading(from:LatLng, to:LatLng) .Returns the heading from one LatLng to