Tag: google maps sdk ios

使用Google-Maps-iOS-SDK(1.8.1)时,架构armv7的未定义符号

我正在尝试使用cocoapods(0.33.1)添加Google-Maps-iOS-SDK(1.8.1) 。 部署目标版本: iOS 7.0 我已经添加了这个pod: pod 'Google-Maps-iOS-SDK' ,'〜> 1.8'正确下载和安装sdk。 我从这里开始添加头文件和样本地图视图加载代码。 我已经正确添加了API密钥。 在一个视图控制器的- (void)viewDidLoad , 我已经添加了以下代码: // 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]; GMSMapView *mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; mapView_.myLocationEnabled = YES; self.view = mapView_; // Creates […]

如何在GMSMapView上设置自定义标注标记(点附近的animation环)

使用谷歌地图iOS SDK我已经实现了一个mapView,我已经创build了如下标记 // Creates a marker in the center of the map. GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = CLLocationCoordinate2DMake(-33.86, 151.20); marker.title = @"Sydney"; marker.snippet = @"Australia"; marker.icon = [UIImage imageNamed:@"point1.png"]; marker.map = mapView_; 但我需要显示animation图像,即一些图像序列显示,围绕一个点的animation环,而不是原来的GMSMarker 图像序列是point1.png point2.png point3.png point4.png point5.png 任何人都可以帮助我做到这一点

Google地图SDK:在Google地图中以设备在后台移动时绘制正确的折线

我正在使用Google Map SDK for iOS。 我正在驾驶模式中绘制多段线。 但是,当我停下来,然后缩放谷歌地图,我的当前位置光标自动移动和重绘之字形多段线,由于所有以前的多段线绘制得到重叠和多段线得到完全改变。当我去后台和驱动器时发生的事情。 我能知道为什么会发生? 而我怎样才能在相同的path上同时在驾驶和行走模式中绘制平滑的多段线。 我的代码 – – (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { pointString=[NSString stringWithFormat:@"%f,%f",newLocation.coordinate.latitude,newLocation.coordinate.longitude]; CLLocationDistance kilometers = [newLocation distanceFromLocation:oldLocation] / 1000; NSLog(@"Distance Travelled in Kilometer :%f",kilometers); [self.points addObject:pointString]; GMSMutablePath *path = [GMSMutablePath path]; for (int i=0; i<self.points.count; i++) { NSArray *latlongArray = [[self.points objectAtIndex:i]componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@","]]; [path addLatitude:[[latlongArray objectAtIndex:0] […]

我怎样才能添加一个button谷歌地图标记信息窗口上的iOS?

我已经添加Google地图sdk for ios到我的iPhone应用程序,我有一些自定义标记,如果点击信息窗口popup与标题,我怎么能添加一个button到这个信息窗口,所以如果按下将转到新的页面? 现在我已经尝试使用这个post来解决这个问题在Google地图SDK中的InfoWindow / Marker上添加Click事件本地iOS /目标C它不给我错误,但它不会工作。 这是我想要我的结果是: http : //www.flickr.com/photos/74719051@N05/6728157477/

Google Maps iOS SDK – 通过GMSMapView添加UIView / UIButton

我正在用故事板开发带有Google Maps iOS SDK的iOS应用程序。 在我的主视图控制器“viewDidLoad”我已经实现了一个GMSMapView并显示它 self.view = mapView_; 和一切顺利。 现在我想在地图上添加一个UIView或者UIButton,比如myLocationbutton样式。 有任何解决scheme添加并通过故事板使用它? 我用代码覆盖了地图上的对象,但我真的需要自动布局,所以通过故事板pipe理它会很好。 谢谢。

如何在GMSMapView中获取animation折线路线,以便在地图移动时与地图一起移动?

我已经通过下面的代码创build了像CAShapeLayer这样的animation折线,我已经将CAShapeLayer作为子图层添加到GMSMapiew中,但是如果我移动地图,图层将不会移动。 在哪里添加图层,让它随着地图一起移动? 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)) breizerPath.addLine(to: self.mapView.projection.point(for: coordinate)) } let shapeLayer = CAShapeLayer() shapeLayer.path = breizerPath.reversing().cgPath shapeLayer.strokeColor = UIColor.green.cgColor shapeLayer.lineWidth = 4.0 shapeLayer.fillColor = […]

在Google Maps SDK中的InfoWindow / Marker上添加Click事件,以实现本机iOS / Objective C

简单的问题 我正在开发一个适用于iOS的应用程序,其中embedded了用于本机iOS的新Google Map。 一切工作正常,除了一个问题,我不能find一个本地IOS / Objective-C的propper解决scheme既不在这里,也不在谷歌(如果有一个请给我看,对不起,烦你) 我想要什么:我希望用户点击打开信息窗口的标记。 之后如果他点击或点击信息窗口,它应该打开一个新的UIView进一步的信息。 我怎样才能做到这一点? 感谢您的build议