Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple MapKit 3D flyover

Tags:

ios

mapkit

Is there any public iOS 8 API available to implement 3D flyover or at least 3D view as shown on Apple Maps App screenshot below?

enter image description here

Update

After below suggestions I've done following code:

import UIKit
import MapKit

class ViewController: UIViewController {

    @IBOutlet weak var mapView: MKMapView!
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        mapView.showsBuildings = true
        let eiffelTowerCoordinates = CLLocationCoordinate2DMake(48.85815,2.29452)
        mapView.region = MKCoordinateRegionMakeWithDistance(eiffelTowerCoordinates, 1000,100)

        mapView.mapType = MKMapType.Standard

        // 3D Camera
        let mapCamera = MKMapCamera()
        mapCamera.centerCoordinate = eiffelTowerCoordinates
        mapCamera.pitch = 45
        mapCamera.altitude = 500
        mapCamera.heading = 45

        // Set MKmapView camera property
        self.mapView.camera = mapCamera
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
}

Now my App looks similar to Apple Maps App but unfortunately not identical.

enter image description here

Is anybody knows how to add all textures to buildings?

Update 2

Google Maps iOS SDK checked. Absolutely same story. No 3D buildings in any mode except kGMSTypeNormal That means no textured buildings available.

Following code:

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        let camera = GMSCameraPosition.cameraWithLatitude(48.85815, longitude: 2.29452, zoom: 50, bearing:30, viewingAngle:40)
        let mapView = GMSMapView.mapWithFrame(CGRectZero, camera: camera)
        mapView.mapType = kGMSTypeNormal
        mapView.buildingsEnabled = true
        self.view = mapView

    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
}

Renders following screenshot:

enter image description here

like image 842
Alexey Avatar asked Nov 26 '14 08:11

Alexey


1 Answers

You can now use the new iOS 9 MKMapTypeSatelliteFlyover type.

Test App Screenshot

like image 106
François Lagunas Avatar answered Oct 14 '22 05:10

François Lagunas