在pod框架内的Google Map

时间:2017-06-29 22:01:51

标签: ios swift google-maps cocoapods

class MarkerItem: NSObject, GMUClusterItem {
  var details: Any
  var filters: Filter
  var icon: UIImage
  var name: String!
  var position: CLLocationCoordinate2D
  var type: LocationService.LocationType
  var collapsed: Bool

  init(position: CLLocationCoordinate2D, name: String, icon: UIImage,
       filter: Filter, type: LocationService.LocationType, details: Any) {
    self.position = position
    self.name = name
    self.icon = icon
    self.filters = filter
    self.type = type
    self.details = details
    self.collapsed = true
  }
}

我正在尝试创建自己的pod框架,重用一些地图视图,但我无法使Google地图工作。 我一直在

Use of undeclared type 'GMUClusterItem'

我的进口

import UIKit
import GoogleMaps
import GooglePlaces

1 个答案:

答案 0 :(得分:0)

GMUClusterItem来自单独的库, Google-Maps-iOS-Utils

您需要为它安装pod:Google-Maps-iOS-Utils然后在Swift文件中导入此库。