google-maps-sdk-ios

How to open google maps app with a dropped pin ? - Swift

坚强是说给别人听的谎言 提交于 2019-11-27 18:14:46
问题 I have this code to open Google Maps App with specific location and it's working but what I need is to drop a pin on that location, is it possible ? if (UIApplication.shared.canOpenURL(URL(string:"comgooglemaps://")!)) { UIApplication.shared.openURL(URL(string: "comgooglemaps://?center=\(self.location.coordinate.latitude),\(self.location.coordinate.longitude)&zoom=14&views=traffic")!) } else { print("Can't use comgooglemaps://"); } How to to do this ? 回答1: q: The query string for your search.

google maps iOS SDK: custom icons to be used as markers

末鹿安然 提交于 2019-11-27 14:25:27
The Android API has a very convenient class for this, IconGenerator . Using the IconGenerator in my Android app , I can easily make a marker that: is a simple rectangle with the color of my choosing. resizes to hold text of any length. is NOT an info window - I'd like the marker itself to contain the text as shown in the image below from the android version. // Android - problem solved with IconGenerator IconGenerator iconGenerator = new IconGenerator(context); iconGenerator.setStyle(IconGenerator.STYLE_GREEN); // or any other color Bitmap iconBitmap = iconGenerator.makeIcon(myString); Marker

How can i add a button to google maps marker info window on ios?

老子叫甜甜 提交于 2019-11-27 14:10:27
问题 I have added Google maps sdk for ios to my Iphone app, and i have some custom markers if clicked info window pops up with title, how can i add a button to this info window so if pressed will go to new page? Now i have tryed to use this post to solve this issue Adding Click Event on InfoWindow/Marker in Google Maps SDK for native iOS/objective C it doesnt give me error but it won't work. this is what i want my result to be:http://www.flickr.com/photos/74719051@N05/6728157477/ 回答1: The answer

Swift iOS google Map, path to coordinate

天大地大妈咪最大 提交于 2019-11-27 13:50:11
I am trying to create a function in my app that will guide the user to a marker I have created. This is the code I am using, it works great, It gets the users current location and show it on the map. But how can I get a directions to a marker? Any awnser will be helpful class Karta: UIViewController, CLLocationManagerDelegate { @IBOutlet var mapView: GMSMapView! let locationManager = CLLocationManager() override func viewDidLoad() { super.viewDidLoad() //allow app to track user locationManager.delegate = self locationManager.requestWhenInUseAuthorization() //set out a marker on the map var

How to force refresh contents of the markerInfoWindow in Google Maps iOS SDK

℡╲_俬逩灬. 提交于 2019-11-27 13:32:32
I'm returning a UIImageView in - (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker; This UIImageView loads images dynamically through a URL using SDWebImage . As the documentation says about marker info windows: Note: The info window is rendered as an image each time it is displayed on the map. This means that any changes to its properties while it is active will not be immediately visible. The contents of the info window will be refreshed the next time that it is displayed. The point is that after downloading the image the info window doesn't refresh and keep

How to send google maps location info through SMS as a link

寵の児 提交于 2019-11-27 13:19:14
问题 In an application that I'm building, I am trying to send my location info(Lat,Long/ Geocoded) to my emergency contact list. I am assuming that all my recipients are using smartphones(Android/iOS) Until now, the application sends my location info as a string through SMS: "I am at: " + Some Geocoded Location However, I thought that this is not an optimal way of sending the exact location info. So, I was thinking if it was possible to generate a map through Google Maps API with a pinpoint/dot on

GoogleMaps without CocoaPods

本秂侑毒 提交于 2019-11-27 11:49:09
I would like to add GoogleMaps to my iOS project but I don't want to use CocoaPods . Is there any way to achieve that? Miguel Rojas Cortés Sure there is: Immediate answer: https://www.gstatic.com/cpdc/0646cf0bd434ed77-GoogleMaps-1.10.1.tar.gz (Download and unzip it) How did I do it (Useful for any library you need) Go to the pod you need, in this case: https://cocoapods.org/pods/GoogleMaps Click on "See Podspec" link below Library on the bottom right corner You are gonna be taken to the podspec.json At the end of the JSON, find the key "source" and use the url provided to download the SDK. If

Google Maps SDK for iOS requires GoogleMaps.bundle to be part of your target under 'Copy Bundle Resources

吃可爱长大的小学妹 提交于 2019-11-27 11:05:18
When I build a GoogleMaps SDK for iOS,these error occurred. *** Terminating app due to uncaught exception 'GMSException', reason: 'Google Maps SDK for iOS requires GoogleMaps.bundle to be part of your target under 'Copy Bundle Resources'' but,GoogleMaps.framework is in copy bundle resources.so,I'm confused.please tell me cause of this problem. The instructions are kinda lacking. I hope this helps... Launch Xcode (easy) Drag the GoogleMaps.framework bundle to the Frameworks group of your project. When prompted, select Copy items into destination group's folder. Right-click GoogleMaps.framework

Google Maps iOS SDK, Getting Directions between 2 locations

我是研究僧i 提交于 2019-11-27 10:48:41
While I am using Google Maps SDK, I am trying to get driving direction between two locations on iOS. I know we can do this using two methods:- 1.) Using URL Scheme, for which it is necessary that Google Maps App is installed on your device. 2.) Using Directions API, via Request-Response and then parsing the JSON. Displaying markers to show the direction. Now, my question is there any other way by which I can do this on iOS? I need to show the direction from my current location to a particular location of which i have the Lat/Long. I mean is it really not possible to simply pass 2 location as

iOS google maps sdk GMSMarker positioning

♀尐吖头ヾ 提交于 2019-11-27 07:37:27
问题 I am working with Google maps and I am able to center the map to the GMSMarker by using GMSCameraPosition *camera = [[GMSCameraPosition alloc] initWithTarget:marker.position zoom:MAP_ZOOM_LEVEL bearing:0 viewingAngle:0]; [mapView animateToCameraPosition:camera]; I am showing a custom callout of size 200*150 and part of it gets hidden when the camera position is changed but I want the callout to be in the center and the map point to be below it. Any ideas how to do this. 回答1: Have a look at