I try to add a map using GMSMapView , but I get errors when I create an output for the view.
The following is a snippet of code:
import UIKit import GoogleMaps 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"] let locationManager = CLLocationManager() override func viewDidLoad() { super.viewDidLoad() locationManager.delegate = self locationManager.requestWhenInUseAuthorization() } 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 get the following errors in line
@IBOutlet weak var mapVIew: GMSMapView!:
- weak can only be applied to class and class protocol types, not <>
- use of undeclared type "GMSMapView"
Please someone can help me.
source share