iphone mapkit drag and get center location

后端 未结 2 833
小鲜肉
小鲜肉 2021-01-06 07:48

HI,

I have a Mapview with some marker points + a marker for current location.

Now, what I want to do here is, when user drag or traverse through mapview, I w

相关标签:
2条回答
  • 2021-01-06 08:20

    Look for theMapView.region.center or theMapView.centerCoordinate (should be the same) in your MapView's delegate -mapView:regionDidChangeAnimated: method.

    0 讨论(0)
  • 2021-01-06 08:36

    Judging by this document:

    http://developer.apple.com/iphone/library/DOCUMENTATION/MapKit/Reference/MKMapView_Class/MKMapView/MKMapView.html

    You can get that with the centerPosition property of your MKMapView. To tell when the location changes, implement the -mapView:regionDidChangeAnimated: method in your MKMapViewDelegate.

    0 讨论(0)
提交回复
热议问题