Tag: 谷歌地图

Google Maps iOS SDK崩溃

我使用谷歌地图iOS SDK与故事板。 从具有根视图控制器和导图的导航视图控制器开始的应用程序。 @implementation MyViewController @synthesize btnMyLock; @synthesize btnNearby; GMSMapView *mapView_; – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:20 longitude:20 zoom:0]; mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; mapView_.myLocationEnabled = YES; self.view = mapView_; // Creates a marker in the center of […]

如何在谷歌地图目标上旋转自定义标记图像c

目前我正在开发像Uber iOS应用程序这样的应用程序。 我已经集成了Google Maps SDK,并且还显示了用户当前位置的自定义图像。 目前,我正在从服务器获取一些司机的当前位置详细信息(例如:100驱动程序)。 我保存在一个NSArray ,我尝试使用以下代码在GoogleMaps上显示这些经纬度: for(int i=0;i<[latLongArr count];i++) { GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = CLLocationCoordinate2DMake([[(NSDictionary *)[latLongArr objectAtIndex:i] valueForKey:@"Latitude"] doubleValue], [[(NSDictionary *)[latLongArr objectAtIndex:i] valueForKey:@"Longitude"] doubleValue]); marker.appearAnimation = kGMSMarkerAnimationPop; marker.title = @"Title"; marker.snippet = @"Sub title"; marker.map = self.gMapView; } 但是我正在寻找像这样的UIDesign&function : 任何人都可以帮助我如何显示用户当前位置和驱动程序的注释列表 (如何在谷歌地图上自定义标记图像)

如何处理同一个地址上的多个位置并将它们集群?

我在Swift中开发的iOS应用程序中使用带有集群的谷歌地图。 在谷歌地图上有一些标记具有相同的经度和纬度。 当用户放大到只有两个位置的位置时,当显示标记时放大一点点,这些标记被闪烁(闪烁),并且彼此快速叠加(一个在另一个)。 当用户放大时,我怎样才能完成,并且只有两个具有相同地址和位置的标记在集群中,不会将它们从集群中分离出来,从而保持集群的状态? 有没有办法从集群中获取标记感谢您的答案。

Google Maps Javascript API不响应iOS 10中的触摸事件

我运行了一个网站,内置了许多自定义的Google地图(search结果或在地理位置产生路线后,在地图上显示各个位置)。 我为此使用Google Maps JavaScript API。 我的用户已经开始报告,在iOS 10上,这些地图不再响应触摸事件 – 他们不能捏缩放,也不能点击地图上的“引脚”来打开位置信息气球。 我一直在寻找所有有这个问题的人都无济于事。 我在这里发现了一个StackOverflow问题( http://webcache.googleusercontent.com/search?q=cache:DaiSdOgD0U4J:stackoverflow.com/questions/39401974/google-maps-javascript-doesnt-pan-or-zoom-in-ios -10 +&cd = 3&hl = en&ct = clnk&gl = us ),但是它被降低了,然后被删除了。 (为什么?)今天一个新的search仍然显示该页面,但它导致404,使search更令人沮丧。 有没有人经历过这个? 这是Google Maps API中的错误吗? 我当然无法在开发者网站上find任何有关这方面的信息。 我可能做出一些非常错误的事情来导致这一点? 代码已经工作了很多年,现在几个月没有修改过,所以我们没有任何改变。 我们在请求中使用API​​密钥 我已经尝试从当前版本(3.25)切换到当前的实验版本(3.26),而没有改变function。 用户报告这种情况发生在iOS 10上的Safari和Chrome上 只希望有人能就此提供任何见解。

GMSMarker不透明度animation不重复

我试图用一个自定义的图标闪烁着一个衰减的animation不透明度GMSMarker。 animation应该重复几次,但不会,它只是执行一个转换,然后停止。 这只在animation不透明属性时才会发生,在animation制作其他属性时工作正常。 这里是代码: GMSMarkerLayer* layer = marker.layer; CABasicAnimation *blink = [CABasicAnimation animationWithKeyPath:@"opacity"]; blink.fromValue = [NSNumber numberWithFloat:0.0]; blink.toValue = [NSNumber numberWithFloat:1.0]; blink.duration = 1.0; blink.autoreverses = YES; blink.repeatCount = 4; [layer addAnimation:blink forKey:@"blinkmarker"]; 文档说,我应该能够animation不透明,因为它是GMSMarkerLayer允许我们的属性之一。 我做错了什么,或者是我碰到的一个已知的错误?

如何从PlaceID或GMSPlace获取GMSAddress

我正在使用适用于iOS的Google Places API的自动填充,并返回placeID。 我怎样才能从placeID获取GMSAddress? 我目前使用lookupPlaceID来获取GMSPlace,然后使用reverseGeocodeCoordinate从GMSPlace的坐标中获取GMSAddress。 但它要求Google API 3次:AutoComplete,lookupPlaceID,reverseGeocodeCoordinate。 有没有办法直接从PlaceID或GMSPlace获取GMSAddress?

didChangeCameraPosition获取可用坐标的包围盒/矩形

我如何从GMSCameraPosition中检索GMSCoordinateBounds? 我想知道每次用户移动摄像机时地图上的可见坐标(至less东北/西南点): (void)mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *)position

自定义标记使用GMUClusterManager

我想使用GMUClusterManager显示自定义标记。 我在这里遵循了标记聚类的所有步骤。 但是有这样的蓝色和红色的图标。 但是,当我放大那个地图时,它只显示红色的标记,但我不想那样。 有实例方法,我已经实现了我的逻辑,但没有用。 – (instancetype)initWithMapView:(GMSMapView *)mapView clusterIconGenerator:(id<GMUClusterIconGenerator>)iconGenerator { if ((self = [super init])) { GMSMarker *marker= [GMSMarker markerWithPosition:CLLocationCoordinate2DMake(24.0, 75.30)]; UIView *customMarker =[[UIView alloc] initWithFrame:CGRectMake(0, 0, 63, 40)]; customMarker.backgroundColor = [UIColor blueColor]; marker.iconView = [self EmployeeMarker:0] ; marker.appearAnimation = kGMSMarkerAnimationPop; marker.map = mapView; } return self; } -(UIView *)EmployeeMarker:(int)labelTextInt{ UIView *customMarker =[[UIView alloc] initWithFrame:CGRectMake(0, […]

检查是否在iOS 6中安装了Google Maps App

我想弄清楚如何处理这段代码的结果,看是否在应用程序中安装了谷歌地图。 [[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"comgooglemaps://"]]; 我正在创build一个UIAlertView在那里的选项,如果是或不是我想给用户不同的选项。 我如何把上面的代码的结果变成一个BOOLEAN? 提前致谢。

Google Maps API:获取当前位置iOS的坐标

我目前正在使用我的项目中的Google Maps API。 我正在设置默认的摄像头/缩放到用户的位置。 我这样做: @implementation ViewController{ GMSMapView *mapView_; } @synthesize currentLatitude,currentLongitude; – (void)viewDidLoad { [super viewDidLoad]; mapView_.settings.myLocationButton = YES; mapView_.myLocationEnabled = YES; } – (void)loadView{ CLLocation *myLocation = mapView_.myLocation; GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = CLLocationCoordinate2DMake(myLocation.coordinate.latitude, myLocation.coordinate.longitude); marker.title = @"Current Location"; marker.map = mapView_; GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:myLocation.coordinate.latitude longitude:myLocation.coordinate.longitude zoom:6]; mapView_ […]