i am trying to add a map using GMSMapView but i am getting errors when i create an outlet for the view. The following is the code snippet:
import UIKit
class MapViewController: UIViewController {
@IBOutlet weak var mapVIew: GMSMapView!
@IBOutlet weak var mapCenterPinImage: UIImageView!
@IBOutlet weak var pinImageVerticalConstraint: NSLayoutConstraint!
var searchedTypes = ["bakery", "bar", "cafe", "grocery_or_supermarket", "restaurant"]
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "Types Segue" {
let navigationController = segue.destinationViewController as! UINavigationController
let controller = navigationController.topViewController as! TypesTableViewController
controller.selectedTypes = searchedTypes
controller.delegate = self
}
}
}
I am getting the following errors at line @IBOutlet weak var mapVIew: GMSMapView!:
1)weak may only be applied to class and class-bound protocol types not <> 2) use of undeclared type "GMSMapView" Please can someone help me out
