GMSMapView显示空白地图
我将GMSMapView添加到我的屏幕中,但是我只能看到我的位置图标和添加的标记。 为什么我看不到路,build筑等?
这是我的代码:
let camera = GMSCameraPosition.cameraWithLatitude(latitude, longitude: longitude, zoom: 11.5) let mapView = GMSMapView.mapWithFrame(CGRectZero, camera: camera) mapView.myLocationEnabled = true mapView.settings.myLocationButton = true self.view = mapView var marker = GMSMarker() marker.position = CLLocationCoordinate2DMake(location.latitude, location.longitude) marker.title = location.name marker.snippet = location.address marker.map = mapView
任何build议?
有一个空白的地图的主要原因之一是密钥设置不正确
您是否正确设置了API密钥?
[GMSServices provideAPIKey:yourAPIKey];
我有同样的问题,API密钥是正确的。 原因是在这行代码
[[NSUserDefaults standardUserDefaults] setValue:@"ru" forKey:@"AppleLanguages"]; [[NSUserDefaults standardUserDefaults] synchronize];
- Google Maps iOS SDK和故事板
- Swift – 如何将自定义字段添加到Google Maps SDK中的标记?
- 谷歌地图(networking应用程序)如何在iphone / ipad上使用手势/缩放进行平滑缩放?
- 如何在iOS中显示信息窗口Google地图不用点击标记?
- 我怎样才能检查一个CLLocationCoordinate2D是否在四个CLLocationCoordinate2D Square内? 在目标C与谷歌地图
- GoogleMaps iOS SDK 1.5将不会加载
- 如何在InfoWindow中包含一个button
- 如何显示iOS中的所有信息窗口谷歌地图不用点击标记?
- REQUEST_DENIED响应Google Places API请求(sensor = true)