google-maps-sdk-ios

Google Maps iOS SDK: Distance between east and west points on the map

最后都变了- 提交于 2019-12-06 02:28:04
问题 How can I calculate the distance (in meters) between the east point and the west point of the map? Suppose the user changed the position scrolling the map, then I catch the movement with mapView:didChangeCameraPosition: delegate method, but I don't know how to calculate the distance. 回答1: Here's a helper function which can be used to calculate the distance in metres between two coordinates: double getDistanceMetresBetweenLocationCoordinates( CLLocationCoordinate2D coord1,

Xcode Google Maps Search Bar

…衆ロ難τιáo~ 提交于 2019-12-06 02:09:28
问题 I'm making an iPhone location based app and I'm having trouble with the last aspect of it. I was wondering if anyone knows how to integrate a search bar that correlates with the map that we can use from MKMapView . It's literally a search bar above the map that the user can type in an area and it will take them there. Is this possible? I've looked around for tutorials but I have only found how to make an app with a map view, annotations and adding callouts. 回答1: What you're looking for is

Fetching nearby places using google maps

拈花ヽ惹草 提交于 2019-12-06 02:05:25
问题 Am trying to implement to find nearby places of my current location using google maps. I have created a project in Google Developer Console and got 'ios APIkey' and 'Server APIkey'. I also enabled Google Places API and Google Maps SDK for iOS. Below is the code to find out near by places. func fetchPlacesNearCoordinate(coordinate: CLLocationCoordinate2D, radius: Double, name : String){ var urlString = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=\(apiServerKey)&location=\

Turn-By-Turn navigation using Google Map SDK and Swift in iOS app

ⅰ亾dé卋堺 提交于 2019-12-06 01:15:47
There is an app, that should provide turn by turn navigation. At the moment it uses Google Map SDK and I was able to draw a route using Google Directions API and GMSPath using tutorial from AppCoda . Problem is it looks kind of ugly - simply thin blue line. My questions is it possible create turn by turn navigation inside an app using Google Maps? I think Google does provide this option but not for free. Have a look at this: https://cloud.google.com/maps-platform/ridesharing/ 来源: https://stackoverflow.com/questions/34723834/turn-by-turn-navigation-using-google-map-sdk-and-swift-in-ios-app

Xcode 5 warns about my architectures setting when I open my Google Maps project created in Xcode 4

♀尐吖头ヾ 提交于 2019-12-05 20:32:44
I just updated to the newly released Xcode 5. I have an iOS app under development that uses the Google Maps iOS SDK. Back when I was developing in Xcode 4, I changed my Architectures setting in my project settings, as per step 7 of Google's instructions for adding the SDK to the project : 7. Choose your project, rather than a specific target, and open the Build Settings tab. Replace the default value of Architectures with armv7. In the Other Linker Flags section, add -ObjC. If these settings are not visible, change the filter in the Build Settings bar from Basic to All. Everything was fine in

GoogleMaps SDK classes undeclared type or unresolved identifier

安稳与你 提交于 2019-12-05 18:01:47
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 project of my workspace, could it be related to my problem ? I finally found the solution. In fact since

Error use unresolved identifier GMSPlacePickerConfig & GooglePlacePicker? (Google Places 2.0)

[亡魂溺海] 提交于 2019-12-05 16:38:29
Error use unresolved identifier GMSPlacePickerConfig & GooglePlacePicker? (Google Places 2.0) import GoogleMaps import GooglePlaces are already declared on top. Here Now, google has broken it into multiple frameworks. You need to add a new pod 'GooglePlacePicker'. abielita I don't see any error on your code based on this sample code . If you are using cocoapod , you need to add pod 'GooglePlaces'. Error Use of unresolved identifier usually occurs when your new class has a different Target(s) from the other one. You can check it in this SO question . It might have a testing target and the other

Search Bar disappears after tap on it

混江龙づ霸主 提交于 2019-12-05 16:25:27
Am trying to implement search nearby places using google maps. The below is the code what I have done so far override func viewDidLoad() { super.viewDidLoad() //Adding Mapview mapView = GMSMapView(frame: CGRectMake(0, 120, self.view.bounds.width, self.view.bounds.height - 120)) self.view.addSubview(mapView) mapView.mapType = kGMSTypeNormal locationManager.delegate = self locationManager.requestWhenInUseAuthorization() let resultTableView = UITableView(frame: CGRectMake(10, 100, 300, 60)) self.searchResultController = UITableViewController() self.searchResultController?.tableView =

iOS GoogleMaps SDK - animateToCameraPosition animation finished handler?

本秂侑毒 提交于 2019-12-05 13:11:37
问题 Currently I am using the GoogleMaps SDK for iOS for various operations. When calling [self.googleMapsView animateToCameraPosition:[GMSCameraPosition cameraWithLatitude:LATITUDE longitude:LONGITUDE zoom:ZOOM]]; is there a completion handler to determine wether the animation finished or not? Of course I get with the GMSMapViewDelegate updates about the cameraPosition but how should I check if the animation finished? - (void)mapView:(GMSMapView *)mapView didChangeCameraPosition:

How to apply animations to GMSMarker

浪尽此生 提交于 2019-12-05 12:29:51
I’m changing my app by migrating iOS maps to google maps using Google Maps SDK for iOS V1.1.0 and I’m trying to animate the markers while adding/removing but I didn’t find any suggestions in the documentation related to this, Please suggest me how to perform the animations on GMSMarkers Amozoss In the GMSMarker Class Reference , it says, for the appearAnimation property: Controls the animation used when this marker is placed on a GMSMapView (default kGMSMarkerAnimationNone , no animation). Using the Google Maps SDK for iOS , a marker can be made like this: GMSMarker *startMarker = [GMSMarker