google-maps-sdk-ios

Custom InfoWindow for marker Google Maps SDK, Swift 2.0

流过昼夜 提交于 2020-01-02 08:42:17
问题 I'm trying to implement this (https://www.youtube.com/watch?v=ILiBXYscsyY) Custom InfoWindow tutorial that was done for Objective-C in Swift 2.0. I have tried doing this by just mix-matching Objective-C and Swift code, but I have been unsuccessful in translating - (UIView *) mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker { CustomInfoWindow *infoWindow = [[[NSBundle MainBundle] loadNibNamed:@"InfoWindow" owner:self options:nil] objectAtIndex:0]; infoWindow.name.text = @

How to apply animations to GMSMarker

眉间皱痕 提交于 2020-01-02 05:21:08
问题 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 回答1: 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

How to change myLocationButton position from a GMSMapView?

本秂侑毒 提交于 2020-01-02 04:52:09
问题 Anybody know how to get the instance of the myLocationButton from a GMSMapView instance? Or a way to change the default position? I just need to move it some pixels up. 回答1: According the the issue tracker for this Issue 5864: Bug: GMSMapView Padding appears not to work with AutoLayout there is an easier workaround: - (void)viewDidAppear:(BOOL)animated { // This padding will be observed by the mapView _mapView.padding = UIEdgeInsetsMake(64, 0, 64, 0); } 回答2: Raspu's solution moves the whole

Can't assign a google maps map to custom view

情到浓时终转凉″ 提交于 2020-01-01 17:12:07
问题 So I followed this guide on how to add a Google map to an iOS application and it all works fine. But what I want to do is assign the map, not to self.view but a custom view I dragged out on to the storyboard inside(?) the other view, because when adding the map to self.view I can't add other elements, like buttons, or well, I probably can but I don't know how. Code: // Start locationmanager locationManager = [[CLLocationManager alloc] init]; locationManager.desiredAccuracy =

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

流过昼夜 提交于 2020-01-01 05:47:05
问题 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 =

How to get particular Marker id in Google Map iOS SDK

瘦欲@ 提交于 2020-01-01 05:36:08
问题 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. 回答1: 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.

Change Camera Zoom based on Radius Google Maps iOS SDK

天大地大妈咪最大 提交于 2019-12-31 09:05:35
问题 I am working on an app that displays certain markers based on a radius around your current location. The radius is between 100 - 5000 meters. I change the radius with an UISlider and redraw the GMSCircle . My problem is that I want to update the camera zoom according to the slider value but I don't have an idea by which scale to divide. This is how I create the camera in the viewDidLoad method where the initial zoom value is 15: GMSCameraPosition *camera = [GMSCameraPosition

Google Maps SDK for iOS localization

戏子无情 提交于 2019-12-31 02:14:31
问题 I have an app that supports only german & english languages and I need to force a map (or even more - geocoder) to be in one of those languages. While using REST API we can easily set language so all responses, error messages etc are returned properly translated, but I'm worried that REST limits (2500 requests per IP) will not be enough. Does anyone know if we can set specific language for Google Maps iOS SDK? 回答1: Google Maps iOS SDK uses the system region/language settings but doesn't

Google Maps SDK iOS - prevent map from changing location on zoom

蹲街弑〆低调 提交于 2019-12-30 11:21:32
问题 I have a problem that I can't solve for some time. I have a GMSMapView with imageView in front of it in the center. In result - I can drag map and always have centered pin. But problems come when I zoom the map. On zooming - position of map target changes and my imageView points to another location. I can detect if zoom changed, but I cant actually force GMSMapView to do ONLY zoom without any location changing. -(void) mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *

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

坚强是说给别人听的谎言 提交于 2019-12-30 05:47:06
问题 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