google-maps-sdk-ios

Exception:Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:…] prior to use

大兔子大兔子 提交于 2019-12-04 00:58:04
问题 I am trying to implement Google Maps SDK into my project using Swift 2.0. I follow this but when running this, my app is getting the following error: 2015-08-25 19:05:17.337 googleMap[1919:54102] *** Terminating app due to uncaught exception 'GMSServicesException', reason: 'Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] prior to use *** First throw call stack: ( 0 CoreFoundation 0x00000001058499b5 __exceptionPreprocess + 165 ... ... ... 31 UIKit

iOS app freezes when loading custom info window for marker on Google Maps

淺唱寂寞╮ 提交于 2019-12-04 00:57:24
问题 I am trying to implement a custom info window on my Google Maps Marker on an iOS app. (As is done here and here for example.) I have created a xib and a UIView class for it. It is called CustomInfoWindow.xib and the class is CustomInfoWindow.swift . My Custom Info Window is currently blank, i.e. I have not yet added any UIControl s to my xib. I have also not yet added any code to my class file. The CustomInfoWindow.swift file basically looks like: import UIKit class CustomInfoWindow: UIView {

Google Maps iOS rightCalloutAccessoryView replacement?

有些话、适合烂在心里 提交于 2019-12-03 21:47:36
问题 Just wondering what's the rightCalloutAccessoryView (the blue button below) replacement in the Google Maps SDK? Or do I need to make a custom view..... EDIT: Is there a better option than GMSMapViewDelegate 's: - (void)mapView:(GMSMapView *)mapView didTapInfoWindowOfMarker:(id<GMSMarker>)marker; ? (it isn't obvious to the user that you can tap the info window...) EDIT 2 This Plane Finder - Live Flight Status Tracker seems to use default callouts with the iOS SDK: http://bit.ly/PFinder. How do

How to customize the InfoWindow of google map iOS SDK?

ぃ、小莉子 提交于 2019-12-03 20:38:53
I want to change the width of the InfoWindow of google map iOS SDK. Is there anyway to do? The reason I want to do it is to show the full address in the InfoWindow. Is there any other way to do so instead of customizing the InfoWindow? Also, can I change the text size in the InfoWindow? At least, I would like to achieve the effect like this map: http://www.google.com/about/company/facts/locations/ where hyperlink can be applied as well. Jing Set the map delegate to the view controller, then implement the google maps delegate method -(UIView *)mapView:(GMSMapView *) aMapView markerInfoWindow:

How do i animate GMSPolyline in google maps ios

烈酒焚心 提交于 2019-12-03 16:34:53
问题 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 ->

GMSMarker icon in the top left corner of the view (iOS)

守給你的承諾、 提交于 2019-12-03 16:09:17
I am trying to create a UITableViewCell containing a GMSMapView with a GMSMarker at the center of the current Position. The problem is that the marker always appears at the top left corner of the current position and I don't know how to solve the problem. I tried to follow these steps: Implementing a Google Map with UItableviewCell here is my code from cellForRowAt: let locationCell = tableView.dequeueReusableCell(withIdentifier: "activityLocationCell") as! ActivityLocationCell let latitude = CLLocationDegrees(activity.coordinates![0]) let longitude = CLLocationDegrees(activity.coordinates![1]

How to get particular Marker id in Google Map iOS SDK

佐手、 提交于 2019-12-03 15:46:52
I am working on google map iOS sdk. Here I create multiple markers in separate location co-ordinates. Now I need to add identifier such like TAG for all markers to perform action for particular marker. If TAG or some other identifier option is not available in google map iOS sdk, please suggest me how to archive it. Thanks in Advance. What I do is that I simply inherit the GMSMarker and add whatever data I need to it like this, I guess this is the best and easiest option you have. @interface ATGoogleMapsSelectiveMarker : GMSMarker @property (nonatomic) int markerID; @property (nonatomic) int

Drag/pan gestures on a GMSMapView not getting captured after update to SDK 1.3.1

夙愿已清 提交于 2019-12-03 15:35:41
I'm having a strange problem with capturing drag/pan gestures on a GMSMapView through a Gesture Recognizer. This problem surfaced only after updating from GMS 1.2 to 1.3.1, where (quoting the documentation ), Touches are consumed more agressively by GMSMapView I have a UIViewController holding a GMSMapView under its main view. I found GMSMapDelegate does not provide methods for handling drag/pan gestures, so I added a UIPanGestureRecognizer to the UIViewController, linked it to an IBAction selector, and set referencing outlet and outlet collection, as per the screenshot linked here: http://i

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

空扰寡人 提交于 2019-12-03 15:29:59
问题 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

GMSMarker opacity animation not repeating

谁说胖子不能爱 提交于 2019-12-03 14:27:30
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]; blink.toValue = [NSNumber numberWithFloat:1.0]; blink.duration = 1.0; blink.autoreverses = YES; blink