google-maps-sdk-ios

about positioning myself,some problems

落爺英雄遲暮 提交于 2019-11-28 13:08:49
I am a new to google map sdk for ios.I have added a map on a view.When I enter this mapView,I want to positioning myself.So I wrote : GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.8683 longitude:151.2086 zoom:6]; _iMapView = [GMSMapView mapWithFrame:CGRectMake(0, 0, 320, 480) camera:camera]; self.iMapView.myLocationEnabled = YES; self.iMapView.delegate=self; GMSMarkerOptions *annotation = [[GMSMarkerOptions alloc] init]; annotation.position = CLLocationCoordinate2DMake(-33.8683, 151.2086); annotation.title = @"Sydney"; annotation.snippet = @"Australia"; //annotation

GoogleMap API Gives Wrong Coordinates for Direction between two Points

こ雲淡風輕ζ 提交于 2019-11-28 12:54:19
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]]; NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy

For google maps iOS sdk, current location occasionally gets plotted at 0,0

时光毁灭记忆、已成空白 提交于 2019-11-28 12:53:51
问题 Not sure why this happens but when it does we'd prefer not to show the user that their current location is 0,0 (it's in the middle of the ocean off the coast of South Africa). Is there any way to detect when this happens so we can show an error message or something to the user? 回答1: Looks like you are not authorized to access the current location of the device. For that, you'll have to add these two keys into your plist: NSLocationAlwaysUsageDescription NSLocationWhenInUseUsageDescription Now

How to implement GMUClusterRenderer in Swift

a 夏天 提交于 2019-11-28 10:25:36
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 MyRenderer: NSObject, GMUClusterRenderer { var mapView: GMSMapView var clusterIconGenerator:

Google Maps iOS SDK - Add UIView/UIButton over a GMSMapView

被刻印的时光 ゝ 提交于 2019-11-28 09:57:49
I'm developing an iOS app with Google Maps iOS SDK with storyboard. On my main view controller in "viewDidLoad" I have implemented a GMSMapView and shows it by self.view = mapView_; and everything goes fine. Now I want to add a UIView or UIButton over the map, like myLocation button style. There is any solution to add it and use it via storyboard? I've overlayed objects on the map by code but i really need autolayout so manage it via Storyboard would be nice. Thanks. Try this (making sure you set the mapView frame to a value different than CGRectZero (which works for self.view=mapView only)):

How do I prevent 'GMSMapView' from Infinite horizontal scrolling?

给你一囗甜甜゛ 提交于 2019-11-28 09:56:54
问题 How do I prevent 'GMSMapView' on IOS 7 from Infinite horizontal scrolling? I am using a 'MKTileOverlay' and 'kGMSTypeNone' to show a custom image which stretches all over the world. (When the user scrolls to the left the image is repeated again. I would like the scrolling to stop here.) 回答1: Hmm, my initial idea would be to use delegate method - (void)mapView:(GMSMapView *)mapView willMove:(BOOL)gesture; to move the camera back when your scrolling limit is reached. Using this, your map view

-convertPoint:toCoordinateFromView: method for Google Maps SDK for iOS [closed]

徘徊边缘 提交于 2019-11-28 09:28:20
问题 How do I implement the MapKit method [googleMapView convertPoint:nePoint toCoordinateFromView:pinView]; in Google Maps SDK for iOS? 回答1: You could use something like this: GMSMapView* mapView = ...; CGPoint point = ...; ... CLLocationCoordinate2D coordinate = [mapView.projection coordinateForPoint: point]; In this case point should be relative to the map view. If you have a point relative to another view (eg pinView in your case), you'd need to convert that into a point relative to the map

Moving the google maps compass

孤人 提交于 2019-11-28 08:04:24
问题 The new google maps SDK for iOS now has a UI widget for displaying a compass. The only problem is I only see methods to toggle it on or off. Do you know if it's possible to change it's position on the map? https://developers.google.com/maps/documentation/ios/map#compass 回答1: -(void)viewDidAppear:(BOOL)animated{ mapView.padding = UIEdgeInsetsMake (64,0,0,0); } This Code It will move Compass Button downward in 64 pixel. 回答2: Not very orthodox but it works. for (UIView *view in gmMapView

Framework not found GoogleMaps sdk in iOS

只愿长相守 提交于 2019-11-28 07:26:35
I want to use google map to existing(not a new one) iPhone project.Now i am using Google map ios sdk and i successfully added google map framework to my project.But i got error like this ld: framework not found GoogleMaps clang: error: linker command failed with exit code 1 (use -v to see invocation) How to solve this issue.I am using xcode4.5 and google map iOS sdk version is 1.5. When i am creating new project with google map iOS sdk then no error getting for me.Error only for existing iOS Project.Please help me. I solved my issue You need to do this Click on your project ( targets ) Click

Google Maps not working on iPhone simulator

一笑奈何 提交于 2019-11-28 06:49:00
I've implemented the "Getting the Google Maps SDK for iOS" step by step finally the simulator running ok no errors found but the map has no details except the marker. As showing in the picture: Also the output on the bottom has this message: 2012-12-23 01:06:59.869 GogleMap[3680:c07] GMSZoomTableQuadTree lacks root zoom table for >tile type (mapType: 10) 2012-12-23 01:07:00.042 GogleMap[3680:1b03] Google Maps SDK for iOS version: 1.0.1.1154 2012-12-23 01:07:00.375 GogleMap[3680:c07] ClientParametersRequest failed, 3 attempts >remaining. Error Domain=DASHConnectionError Code=100 "The operation