Adding Click Event on InfoWindow/Marker in Google Maps SDK for native iOS/objective C

后端 未结 7 2120
无人及你
无人及你 2020-12-05 05:41

Simple Question

I´m working on an App for iOS where I embedded the new Google Map for native iOS. Everything works fine except one problem where I can´t find a propp

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-05 06:07

    a full answer for swift 4

    1. add GMSMapViewDelegate as delegate

    2. set yourmap delegate like this : googlemap.delegate = self

    3. add this func

    func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool 
                {
                   // do something
                    return true
                }
    

提交回复
热议问题