Get LAT and LONG from tapped overlay in Google Maps

前端 未结 3 1216
耶瑟儿~
耶瑟儿~ 2020-12-12 05:05

When a user taps an overlay, the following code is triggered:

func mapView(_ mapView: GMSMapView, didTap overlay: GMSOverlay) {


    }

I w

3条回答
  •  半阙折子戏
    2020-12-12 05:45

    You can use didTapAt delegate method for the same.

    @wajih, for you did the method didTapAt was called when you tap on landmark names or titles? For me it's not getting called. For my case the landmark title is above the polygon and the didTapAt method is not getting called, but if i set tappable to true then didTap(overlay) is called perfectly.

提交回复
热议问题