开发者

MKMapView userlocation difference

开发者 https://www.devze.com 2022-12-22 23:31 出处:网络
Declaration;) MKMapView mapView; I 开发者_开发知识库can\'t found the difference between mapView.userLocation.location.coordinate and mapView.userLocation.coordinate. Is there any?The mapView.userL

Declaration;)

MKMapView mapView;

I 开发者_开发知识库can't found the difference between mapView.userLocation.location.coordinate and mapView.userLocation.coordinate. Is there any?


The mapView.userLocation return an MKUserLocation (here) and I don't know where you have found this, but it has no member call coordinate. (see MKUserLocation Class Reference)


Don't have enough rep to post this as a comment on Yannick's answer so I have to post as a separate answer.

MKUserLocation conforms to MKAnnotation. MKAnnotation has a required coordinate property, so this should work:

mapView.userLocation.coordinate

That said, I don't know if it differs from mapView.userLocation.location.coordinate. I can't imagine that it does.

0

精彩评论

暂无评论...
验证码 换一张
取 消