小编tim*_*tim的帖子

Swift Google Map Marker Tap 事件对我不起作用

我正在研究Swift谷歌地图。didTapMarker当用户点击标记时,我无法让委托执行。我把mapView.delegate = selfviewDidLoad方法,但它并没有帮助。

import UIKit
import GoogleMaps
import Alamofire
import ObjectMapper
import SwiftyJSON

class ViewController: UIViewController, GMSMapViewDelegate, GMUClusterManagerDelegate, CLLocationManagerDelegate {
var locationManager = CLLocationManager()
lazy var mapView = GMSMapView()

private var clusterManager: GMUClusterManager!

//true - marker clustering / false - map markers without clustering
let isClustering : Bool = false

//true - images / false - default icons
let isCustom : Bool = false

var userLocation: CLLocation = CLLocation(latitude: 0, longitude: 0) …
Run Code Online (Sandbox Code Playgroud)

google-maps ios swift

2
推荐指数
1
解决办法
5828
查看次数

标签 统计

google-maps ×1

ios ×1

swift ×1