google-maps-sdk-ios

GoogleMap API Gives Wrong Coordinates for Direction between two Points

我们两清 提交于 2019-11-27 07:25:47
问题 I am using GoogleMap API for showing draw direction between two points on GoogleMap. i want to give support on iOS 6.1 so i use GoogleMap i know about iOS7 recover this. using below code for parsing and get Steps for coordinates to draw polyline on Map: NSString *str=@"http://maps.googleapis.com/maps/api/directions/json?origin=bharuch,gujarat&destination=vadodara,gujarat&sensor=false"; NSURL *url=[[NSURL alloc]initWithString:[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]

Google Maps iOS SDK, Getting Current Location of user

為{幸葍}努か 提交于 2019-11-27 07:08:33
For my iOS app (building in iOS7 ),i need to show user's current location when the app load.I am using Google Maps iOS SDK . I am following this Google Map But i can't figure it out. Please help if you go through the path. It seems Google Maps iOS SDK cannot access to the device position. So you have to retrieve the position by using CLLocationManager of iOS . First, add the CoreLocation.framework to your project : Go in Project Navigator Select your project Click on the tab Build Phases Add the CoreLocation.framework in the Link Binary with Libraries Then all you need to do is to follow the

How to set the frame for mapview - in google GMSMap for iOS6

浪尽此生 提交于 2019-11-27 07:07:17
问题 I am trying to load places inside Google Map View for iOS6. How to set the frame for the Map ? Currently it is fullscreen -(void)loadView { GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:10.00989 longitude:76.316142 zoom:15]; mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; self.view = mapView_; } I tried by creating a new (small) view inside the current view and add map inside that,but at that time the page is not getting loaded.It shows a full black screen -

GoogleMaps basic iOS demo app crash - unrecognized selector sent to instance

[亡魂溺海] 提交于 2019-11-27 05:18:50
Im trying to run the basic iOS demo SDK code. I have created the API keyand it loads ok. Although i've transfered the code from viewDidLoad to loadView the effect remains. See the following code -(void)loadView{ // Create a GMSCameraPosition that tells the map to display the // coordinate -33.86,151.20 at zoom level 6. GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86 longitude:151.20 zoom:6]; _mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; _mapView.myLocationEnabled = YES; self.view = _mapView; // Creates a marker in the center of the map. GMSMarker

Custom annotation view in Google Maps SDK

自闭症网瘾萝莉.ら 提交于 2019-11-27 04:43:47
I created an iOS application based on maps in which I thought to use Google Maps SDK for iOS instead of Mapkit, I found the documentation but it I didn’t find methods related to custom annotation view, Can anyone provide me the solution for how to create custom annotation view(info window) and how to add content(title, snippet) for it. tony m If you check GMSMapView.h within GoogleMaps.Framework, you can see the below method which should let you add a custom infowindow for a marker, instead of using standard title and snippet alone: NOTE you (op) say annotationView=infoWindow BUT NORMAL:

How to setRegion with google maps sdk for iOS?

久未见 提交于 2019-11-27 04:27:19
问题 How to setRegion with google maps sdk for iOS? I want set zoom for location and radius of markers. 回答1: UPDATE: The original answer below is obsolete as of version 1.2 of the SDK - you can now use the fitBounds: method of the GMSCameraUpdate class: https://developers.google.com/maps/documentation/ios/reference/interface_g_m_s_camera_update Original answer: The MKMapPoint type in MapKit defines a 2D projection of a map. Although the actual values of the projection are meant to be opaque, they

How to get animated polyline route in GMSMapView, so that it move along with map when map is moved?

元气小坏坏 提交于 2019-11-27 03:51:33
I have created animated polyline like CAShapeLayer by following code, I have added CAShapeLayer as sublayer to GMSMapiew but, if I move the map the layer won't moves. where to add the layer, so that it move along with map? func layer(from path: GMSPath) -> CAShapeLayer { let breizerPath = UIBezierPath() let firstCoordinate: CLLocationCoordinate2D = path.coordinate(at: 0) breizerPath.move(to: self.mapView.projection.point(for: firstCoordinate)) for i in 1 ..< Int((path.count())){ print(path.coordinate(at: UInt(i))) let coordinate: CLLocationCoordinate2D = path.coordinate(at: UInt(i))

How to implement GMUClusterRenderer in Swift

天涯浪子 提交于 2019-11-27 03:31:34
问题 I am using Google Maps API for iOS and want to use marker clustering utility. I figured out how to show clustered markers, but I would like to customize markers. Can someone explain how to set/change icon and title of each marker or clustered markers? An example code would be very helpful. class POIItem: NSObject, GMUClusterItem { var position: CLLocationCoordinate2D var name: String! init(position: CLLocationCoordinate2D, name: String) { self.position = position self.name = name } } class

ios Google SDK Map cannot create dotted polylines

女生的网名这么多〃 提交于 2019-11-27 03:30:47
问题 I have called the below method to draw the dotted polylines between the markers. When it comes to the execution, it shows that only solid lines are drawn. Would you please tell me how to draw dotted lines on to Google Map ? - (void) createDashedLine:(CLLocationCoordinate2D )thisPoint:(CLLocationCoordinate2D )nextPoint: (UIColor *)colour { NSLog(@"next pt latitude %ff" , nextPoint.latitude); NSLog(@"next pt longitude %ff" , nextPoint.longitude); NSLog(@"this pt laatitude %ff" , thisPoint

Marker clustering with google maps SDK for iOS?

让人想犯罪 __ 提交于 2019-11-27 03:15:59
I am using Google Maps SDK in my iOS app, and I need to group markers which are very close to each other - basically need to use marker clustering like its shown in the attached url. I am able to get this functionality in the Android maps SDK, but I didn't find any library for the iOS Google Maps SDK. Can you please suggest any library for this? Or suggest a way to implement a custom library for this? ( Source of this picture) Aurelien Porte To understand the underlying concept of this double map solution, please have a look at this WWDC 2011 video (from 22'30). The Map kit code is directly