如何使用MKMapVIew iOS显示3d建筑物

时间:2015-07-28 08:15:08

标签: ios objective-c dictionary mkmapview

我想使用 MKMapview 来显示3D建筑,就像进入谷歌地图一样

显示3d建筑的所需Mapview:

enter image description here

我当前的地图就像

enter image description here

我已设置_mapView.showsBuildings =YES;

代码:

CLLocationCoordinate2D ground = CLLocationCoordinate2DMake(53.58448, -8.93772);
CLLocationCoordinate2D eye = CLLocationCoordinate2DMake(53.58448, -8.93772+.0020);

MKMapCamera *mapCamera = [MKMapCamera cameraLookingAtCenterCoordinate:ground
                                                    fromEyeCoordinate:eye
                                                          eyeAltitude:3300];

_mapView.camera.pitch = 10;
_mapView.showsBuildings  =YES;
_mapView.pitchEnabled = YES;
_mapView.showsPointsOfInterest = YES;
_mapView.zoomEnabled = YES;
_mapView.scrollEnabled = YES;
_mapView.showsUserLocation = NO;
_mapView.camera = mapCamera;

0 个答案:

没有答案