Tag: google maps

ItunesConnect上的Google Maps SDK崩溃testing不是Xcode

Google Maps SDK让我的应用程序崩溃,我不知道我在做什么错误…我把我的GMSMapView在界面生成器中的UIView 。 这是我的代码: Contact.h : #import <UIKit/UIKit.h> #import <MessageUI/MessageUI.h> #import <ParseFacebookUtils/PFFacebookUtils.h> #import <GoogleMaps/GoogleMaps.h> @interface Contact : UIViewController <MFMailComposeViewControllerDelegate> – (IBAction)openMail:(id)sender; @property (weak, nonatomic) IBOutlet GMSMapView *mapView; @property (weak, nonatomic) IBOutlet UILabel *contactLabel; @end Contact.m : #import "Contact.h" @interface Contact () @end @implementation Contact – (void)viewDidLoad { [super viewDidLoad]; #pragma mark – Google Map […]

embedded谷歌地图在UIWebView而不要求位置的权限,并显示谷歌面板

我正在使用加载在UIWebView中的谷歌地图来显示2个位置之间的方向 这里是我在UIWebView中加载的url NSString *routeString = [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f&output=embed",[myData.myLat doubleValue],[myData.myLng doubleValue],[view.annotation coordinate].latitude,[view.annotation coordinate].longitude]; 当我删除output = ember参数的谷歌面板显示,但UIWebView要求获得用户的位置,我已经在我的应用程序做的权限, 当我添加输出=embeddedUIWebView不要求位置权限,但谷歌面板不显示。 我如何防止UIWebView显示位置权限,并在同一时间查看谷歌面板? 日Thnx

如何在Google Map iOS Swift中获取经纬度位置的纬度

我试图从谷歌地图视图中的挖掘位置获取CLLocationCoordinate2D对象。 但它总是以-180.0,-180.0为单位,如下所示: CLLocationCoordinate2D(latitude: -180.0, longitude: -180.0) 我正在使用以下代码: override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { let touchpoint = touches.first if let touch = touches.first { var point: CGPoint = touch.locationInView(self.view) let touchMapCoordinate: CLLocationCoordinate2D = MyMapView.projection.coordinateForPoint(point) } }

在Xcode中添加其他依赖项后,未find模块“Google地图”

我一直在使用Google地图SDK,直到我在我的podfile中添加了另一个依赖关系之前,我一直没有任何问题。 我得到这个错误在Xcode说:“模块”谷歌地图“没有find”我有'@import GoogleMaps'。 如果我拿出新的荚错误消失,一切正常。 我刚刚开始使用cocoaPods,是否有我在我的podfile中缺less的东西? platform :ios, '6.1' pod 'SDWebImage', '~>3.7' source 'https://github.com/CocoaPods/Specs.git' pod 'GoogleMaps'

有没有一个谷歌地图相当于mkmapsnapshotter?

我有一个UITableView可能包含大量的单元格,在一些单元格中,我想要一个UIImageView显示一个位置的地图,只有在运行时才知道它的坐标。 我想要表视图滚动顺利,我希望单元格中的地图不可滚动。 我已经被指示避免苹果地图。 此外, MKMapSnapshotter是iOS 7及以上。 我必须支持iOS 6。 那么Google Maps图像API是我最好的select吗? 无论如何,我已经在使用Google Maps iOS SDK ,所以我想尽可能使用它。 但是它有这个function吗? 相当于MKMapSnapshotter ? 我很惊讶,我无法在文档中find它。

在Google Maps SDK for iOS上执行GMSMapView的屏幕截图

当我尝试拍摄GMSMapView(Google Maps SDK iOS)的任何部分时,我正在努力的一个项目。 UIGraphicsGetImageFromCurrentImageContext()UIImage输出是不可见的。 我最终发现,GMSMapView是用OpenGL渲染的。 知道这一点,我试图使用glReadPixels()方法。 令人不安的是,我能够在iPhone模拟器上检索地图屏幕截图,但是当我在真实设备上使用同样的方法时,它仍然是不可见的(iOS 6)。 我想知道是否有人遇到同样的问题? 我已经做了我的调查份额。 我找不到与我的情况有关的任何事情。 我发现的大多数通用解决scheme都说我应该更新一些CAEAGLLayer属性。 我认为GMSMapView会限制我find适当的层,但是我能够find并更新CAEAGLLayer,如下所示: [(CAEAGLLayer *)[[[mapView_ subviews] objectAtIndex:0] layer] setOpaque: NO]; [(CAEAGLLayer *)[[[mapView_ subviews] objectAtIndex:0] layer] setDrawableProperties:[NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES],kEAGLDrawablePropertyRetainedBacking,kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat,nil]]; 论坛build议通过将图层的OPAQUE属性设置为NO,并将保留的后台属性设置为YES,可以缓解iOS 6问题。 它确实在模拟器上,但不是设备。 我偶然发现的最后一个修复程序说要将主OpenGL视图的preserveBackBuffer更新为YES。 这是我的技术专长结束的地方。 我一直无法find在哪里或如何更新GMSMapView的preserveBackBuffer值。 我假设这是修复所有我的屏幕捕获问题的修复。 似乎只是运行iOS 6 +的设备的一个问题。 有没有人有这个问题的testing解决方法?

无法加载优化模型 – GoogleMaps SDK IOS

从CocoaPods安装Google Maps SDK后,我收到了这个错误。 CoreData: annotation: Failed to load optimized model at path '/Users/nabeel/Library/Developer/CoreSimulator/Devices/96078737-8063-4BC1-97DB-7FECEC6835D9/data/Containers/Bundle/Application/972CD686-82DD-4357-9CDD-65A735D82190/My-APP-Beta.app/GoogleMaps.bundle/GMSCacheStorage.momd/StorageWithTileVersionID.omo' CoreData:注释:无法在path加载优化模型'/ Users / nabeel / Library / Developer / CoreSimulator / Devices / 96078737-8063-4BC1-97DB-7FECEC6835D9 / data / Containers / Bundle / Application / 972CD686-82DD-4357-9CDD -65A735D82190 / My-APP-Beta.app / GoogleMaps.bundle / GMSCacheStorage.momd / StorageWithTileVersionID.omo'CoreData:annotation:无法在path'/ Users / nabeel / Library / Developer / CoreSimulator […]

Google地图中的当前位置

我试图在Google地图上显示用户的当前位置,但在下面的情况下,地图甚至不显示。 我应该改变什么来解决这个问题? var locationManager = CLLocationManager() override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. //user location stuff locationManager.delegate = self locationManager.requestWhenInUseAuthorization() locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager.startUpdatingLocation() } func locationManager(manager: CLLocationManager, didFailWithError error: NSError) { print("Error" + error.description) } func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { let userLocation = locations.last let […]

让用户在IOS 6中select谷歌地图和苹果地图?

我在iOS应用程序中使用基本的MapKitfunction。 有没有办法让我的iOS 6用户在Google和Apple地图之间select我的应用程序中提供的地图数据? 如果是这样,我怎么能编程呢?

iOS,ld:框架没有find用于架构arm64的GoogleMaps

我正在开发一个应用程序使用谷歌地图。 我会解释我用谷歌地图做了什么,也许你可以帮助我。 我使用谷歌地图框架没有POD,但在谷歌地图的一些错误后,我删除了谷歌地图框架的参考,我用POD安装它。 一切工作正常,但是当我打 产品 – >testing 现在我得到这个错误: ld: framework not found GoogleMaps for architecture arm64 任何想法如何解决这个? 谢谢! Podfile看起来像这个Cocoapods v1.0 beta 6): platform :ios, '8.0' use_frameworks! target 'Project' do pod 'GoogleMaps' target 'ProjectTests' do inherit! :search_paths pod 'Mockingjay' end end