Buat File Pod dan Isi :
Berikut contoh instalasi Google Maps dengan Pod :
Controller :
Selengkapnya bisa dilihat di https://youtu.be/s8sTx0vsRR8
pod 'GoogleMaps'Jalan perintah pod install di terminal :
pod install
IOS Google Maps |
Berikut contoh instalasi Google Maps dengan Pod :
Controller :
import UIKitTambahkan pada AppDelegate,swift :
class ViewController: UIViewController {
@IBOutlet weak var mapView: GMSMapView!
override func viewDidLoad() {
super.viewDidLoad()
let camera : GMSCameraPosition = GMSCameraPosition.cameraWithLatitude(-7.798657, longitude: 110.365746, zoom: 15.0)
mapView.camera = camera
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
GMSServices.provideAPIKey("Key")
// Override point for customization after application launch.
return true
}
Selengkapnya bisa dilihat di https://youtu.be/s8sTx0vsRR8