Is there a Google Map event listener for panning or zooming map?

后端 未结 4 1292
刺人心
刺人心 2021-02-19 20:10

I want to be able to detect if the user has zoomed out or moved the map center. I have seen post about an event listener but in Javascript and I am trying to see if there is any

4条回答
  •  孤街浪徒
    2021-02-19 20:59

    Swift

    extension MyMapViewController:GMSMapViewDelegate {
    
        func mapView(_ mapView: GMSMapView, didChange position: GMSCameraPosition) {
            //do something
        }
    }
    

提交回复
热议问题