开发者

iPhone - Replace GoogleMap MapKit user's direction blue dot with spinning arrow

How may I show an arrow that shows the users directi开发者_运维知识库on instead (over ?) the existing blue dot in the MapKit on a GoogleMap view ?


From the documentation of the mapView:viewForAnnotation: delegate method:

If the object in the annotation parameter is an instance of the MKUserLocation class, you can provide a custom view to denote the user’s location. To display the user’s location using the default system view, return nil.

So you should do just that. Check the class of the annotation for MKUserLocation and in case of a successful match, return a custom view. You must take care to update this view yourself whenever the user's heading changes.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜