google-maps-sdk-ios

Animating GMSMarker in a circular path

可紊 提交于 2019-12-24 01:45:01
问题 I understand how to normally animation other CALayers in a circular path based on this SO question: iPhone - How to make a circle path for a CAKeyframeAnimation? However, the GMSMarkerLayer is a special subclass of CALayers that does not seem to respond to the "position" keypath (following instructions in that link does nothing that I can visibly see) but instead will respond to the "latitude" and "longitude" keypaths instead. Here's the code that I've tried: CAKeyframeAnimation

Cannot set color for GMSPolyline with Google Map SDK

雨燕双飞 提交于 2019-12-24 00:57:34
问题 I'm using google map sdk in iOS 7.1 How can I set color for GMSPolyline, the default is black. I have try with setStrokeColor and setSpans: setStrokeColor:UIColorFromRGB(0xff0000, 1) setSpans:@[[GMSStyleSpan spanWithColor:UIColorFromRGB(0xff0000, 1)]] but it no have effect, I can only change the opacity by set alpha. Anyone can help me ? Thank you. 回答1: There are several ways to color polylines. Google's iOS SDK documentation has good info on this. The simplest way is to set the polyline's

iOS GoogleMaps SDK error: “[__NSCFDictionary objectForKeyedSubscript:]: Unrecognized selector sent”

你说的曾经没有我的故事 提交于 2019-12-23 22:25:38
问题 I follow every step in getting started with google maps for ios, I did everything ok but in every example that I try, the emulator start asking if I want turn on the GPS and after that, it throws the error: 2013-03-07 16:05:09.135 Cicerone4all[352:14e03] Google Maps SDK for iOS version: 1.1.0.2080 2013-03-07 16:05:09.750 Cicerone4all[352:10d03] -[__NSCFDictionary objectForKeyedSubscript:]: unrecognized selector sent to instance 0xcac9b40 2013-03-07 16:05:09.755 Cicerone4all[352:10d03] ***

Crash while getting my location on GoogleMaps on iPhone

谁说我不能喝 提交于 2019-12-23 21:31:13
问题 I am writing you because I am stuck with a super strange error. I tried to add GMS on my app, and finally, when I have to get device location, I am stuck with this crash: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x7ff7fd82def0 of class GMSMapView was deallocated while key value observers were still registered with it. Current observation info: ( Context: 0x0, Property: 0x7ff7fdc2f470> Code is initialized here: self.mapView

Highlight countries on Google Map for ios and android

倾然丶 夕夏残阳落幕 提交于 2019-12-23 20:40:12
问题 I am trying to achieve highlighting country on map. For iOS I found few demo Demo1 Demo2 But I am searching for the api that work for both ios and android. I looked for google map api version 1.8.1. Achieve this is only by drawing polygon on map for those certain countries? Is there any other good way to achieve this? 来源: https://stackoverflow.com/questions/25665518/highlight-countries-on-google-map-for-ios-and-android

Can't get GoogleMaps SDK to work on Xcode Test Target (works on App Target)

时光怂恿深爱的人放手 提交于 2019-12-23 17:33:29
问题 The Setup I have successfully integrated the GoogleMaps SDK into my Swift 2 project using CocoaPods. My setup is pretty much that suggested by the Ray Wenderlich tutorial on the subject. The only difference I can find is, I have to add this line to AppDelegate: import UIKit import GoogleMaps // <- THIS LINE @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { ... ...in order to use the framework's classes. The tutorial suggests importing: #import <GoogleMaps/GoogleMaps.h

Google maps iOS SDK place id on tap

元气小坏坏 提交于 2019-12-23 12:31:10
问题 Is it possible to get the place id when tapping on a POI (iOS google maps SDK). For example clicking on a restaurant I would like to bring up some of the information such as reviews and opening times. Looking at the docs I can see the delegate method mapView(mapView: GMSMapView!, didTapAtCoordinate coordinate: CLLocationCoordinate2D) but nothing that provides the place id. Im not sure how accurate it would be to try and find the exact place id using just the coordinates. 回答1: You can do a

Google maps iOS SDK level of detail polylines

无人久伴 提交于 2019-12-23 10:19:25
问题 I am using the Google Maps iOS SDK to draw a list of polylines. The polylines come from a server, and for each next polyline, the starting point corresponds with the end point of the previous polyline. I notice that Google Maps changes the level of detail of the polylines at different zoom levels, probably an optimisation thing. This results in small gaps between the several polylines at lower zoom levels. The reasons behind splitting a polyline up in several smaller lines are not up to me,

Linker errors in a Swift project with Google Maps for iOS added via CocoaPods

走远了吗. 提交于 2019-12-23 07:33:23
问题 I'm trying to add Google Maps SDK for iOS for a Swift project I'm working on via CocoaPods since CocoaPods now supports Swift. Here's my podfile. source 'https://github.com/CocoaPods/Specs.git' use_frameworks! platform :ios, '7.0' pod 'Google-Maps-iOS-SDK' Pod installation completes successfully and I could import the framework like this import GoogleMaps without any compilation errors. But then I went ahead and added a UIView and set its class to GMSMapView and added a IBOutlet to my view

Use GOOGLE maps in iOS supporting iOS 6 and also iOS 5

泪湿孤枕 提交于 2019-12-23 03:44:08
问题 I am in a need of having maps support for an app, but the concern is prior to ios 6 the iOS mapKit uses the google maps which is rich in content, but in iOS 6 its using its own maps which is not that rich in content. I have search for the Google API for ios 6, which is great but I need to support prior to ios 6 also. Please help. 回答1: The new Google Maps SDK for iOS supports back to iOS 5.1, see here: https://developers.google.com/maps/documentation/ios/intro#supported_platforms 来源: https:/