google-maps-sdk-ios

How can I add a 3d object as a marker on Google Maps like Uber does

淺唱寂寞╮ 提交于 2021-02-17 11:47:38
问题 I want to add a 3d marker for showing cars on map with rotation like Uber does but I can't find any information on adding 3d objects on Google Maps SDK for iOS. Would appreciate any help. Apparently no one is seeing what OP and I are seeing so here's a video of a Uber car turning 90 degrees. Play it frame by frame and you'll notice that it's not a simple image rotation. Either Uber went through the trouble of doing ~360 angles of each vehicles, or it really is a 3D model. Doing 360 images of

UISwitch doesn't work on Google Maps SDK for iOS?

南笙酒味 提交于 2021-02-07 19:49:43
问题 I'm trying to create a UISwitch laid on mapView_ of Google Maps for my iOS app, but it seems not to work. In details, I first followed instruction from google, created mapView_, then made it my viewcontroller's view: self.view = mapView_; Then, I created an UISwitch programmatically and added it as a subview: mySwitch = [[UISwitch alloc] initWithFrame:CGRectMake(50, 360, 0, 0)]; [mySwitch setBackgroundColor:[UIColor clearColor]]; [mySwitch addTarget:self action:@selector(changeSwitch:)

Inverted Polygon in GMSMapView

孤街醉人 提交于 2021-02-07 12:19:32
问题 I have to use Google Map for my iPhone project and I'am using GMSPolygon to draw a polygon but How can I fill everywhere on my map except the interior of the polygon. Like the image below. Thank You. 回答1: I have played with your question. Main idea is to fill all Earth with polygon and then make holes for your particular area. Here is example code, but problem is that I can`t create polygon to cover whole Earth. First approach is to create 4 polygons for each quarter. PGeoCountry is a struct

How to work with new iOS Google Maps SDK under no ARC project

限于喜欢 提交于 2021-02-04 21:48:15
问题 I'm trying to add the new Google Maps API into my iOS application, however it does not use ARC yet. So, checking at the docs I think it's a requirement to have ARC in order for the SDK to work. How could I do that? I mean an option would be activating ARC just for the resources that will work with Google maps. (.xib files, controllers) How could that be done? 回答1: you can disable ARC for individual files by adding a compiler flag -fno-objc-arc This flag tells the compiler that the files are

How to deselect a GMSMarker after removing custom infowindow in google maps swift

做~自己de王妃 提交于 2021-01-28 06:20:24
问题 So I have been using Google Maps iOS SDK 4.0.0 and my requirement is like this when I tap on a marker it should add UIViewContoller's view which I easily achieved. Take a look on the following code: var customeVC:CustomViewController? func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool { customeVC = CustomViewController(nibName: "CustomViewController", bundle: nil) customeVC?.delegate = self self.addChild(customeVC!) customeVC?.view.frame = self.view.frame self.view

GMSPlace returns invalid coordinate (-180, -180), but name and place ID are correct

你说的曾经没有我的故事 提交于 2020-12-02 05:57:24
问题 I'm trying to implement an autocomplete search on Google Maps that will show the location that the user selects on the map with a marker. Search works fine. The problem is as follows. When I select a location from the search results, I get a GMSPlace object that has the correct name as the selected value, correct place ID (confirmed using this link), but incorrect coordinates ( -180.0,-180.0 , or the kCLLocationCoordinate2DInvalid constant). I tested this on multiple locations. Most of this

(SwiftUI) Google Maps Works Fine When Hitting “Play” But Doesn't Work On Side Preview

房东的猫 提交于 2020-07-23 08:04:13
问题 When I hit the "play" button, the phone emulator pops up and it shows google maps with my annotations. However, it will not show on the side preview of SwiftUI. I get the error: "Terminating app due to uncaught exception 'GMSServicesException', reason: 'Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] prior to use'" I have followed Google Maps "Getting Started" and have have provided the key but I'm still experiencing this error. Here is rest of my code: struct

(SwiftUI) Google Maps Works Fine When Hitting “Play” But Doesn't Work On Side Preview

你。 提交于 2020-07-23 08:02:11
问题 When I hit the "play" button, the phone emulator pops up and it shows google maps with my annotations. However, it will not show on the side preview of SwiftUI. I get the error: "Terminating app due to uncaught exception 'GMSServicesException', reason: 'Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] prior to use'" I have followed Google Maps "Getting Started" and have have provided the key but I'm still experiencing this error. Here is rest of my code: struct

(SwiftUI) Google Maps Works Fine When Hitting “Play” But Doesn't Work On Side Preview

会有一股神秘感。 提交于 2020-07-23 08:01:31
问题 When I hit the "play" button, the phone emulator pops up and it shows google maps with my annotations. However, it will not show on the side preview of SwiftUI. I get the error: "Terminating app due to uncaught exception 'GMSServicesException', reason: 'Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] prior to use'" I have followed Google Maps "Getting Started" and have have provided the key but I'm still experiencing this error. Here is rest of my code: struct

GMSMapStyle unresolved identifier

≯℡__Kan透↙ 提交于 2020-04-13 04:39:43
问题 I want to change my google map style in ios. For that I am trying to implement this code. GMSMapStyle I am importing import GoogleMaps . But I am getting this error Use of unresolved identifier GMSMapStyle . Can anybody help me to which module I have to import to avoid this error. Thanks in advance 回答1: While updating an app, I was getting a similar error but with mapType: 'Use of unresolved identifier 'kGMSTypeTerrain' with the following code: @IBOutlet weak var googleMapView: GMSMapView!