How to launch Google Maps or Apple Maps from an iOS app with Swift

  1. 4 years ago
    Edited 3 years ago by niutech

    I need a sample code how to launch Google Maps or Apple Maps with Swift


  2. I want someting like this in swift language:

  3. 3 years ago


    22 Jan 2016 Administrator

    Here is a tutorial on using Google Maps SDK in Swift .

    Sanple Swift code:

    import UIKit
    import GoogleMaps
    class ViewController: UIViewController {
      override func viewDidLoad() {
        let camera = GMSCameraPosition.cameraWithLatitude(20.0,
            longitude:20.0, zoom:6)
        let mapView = GMSMapView.mapWithFrame(CGRectZero, camera:camera)
        let marker = GMSMarker()
        marker.position =
        marker.snippet = "Hello World"
        marker.appearAnimation = kGMSMarkerAnimationPop = mapView
        self.view = mapView

or Sign Up to reply!