F. *_*uti 3 google-maps ios swift
我将GMSMapView添加到我的屏幕中,但我只能看到我的位置图标和我添加的标记.为什么我看不到道路,建筑等?
这是我的代码:
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
Run Code Online (Sandbox Code Playgroud)
有什么建议吗?
拥有空白地图的主要原因之一是密钥设置不正确
您是否正确设置了API密钥?
[GMSServices provideAPIKey:yourAPIKey];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3014 次 |
| 最近记录: |