[英]How do I display a custom annotation on MKMapView?
I am trying to add a custom annotation to my map view. 我正在尝试向地图视图添加自定义注释。 My goal is to have it so when you tap the annotation, there will be a picture, a label for a name, and a label for how far away the annotation is from your location (I can add the calculation logic later).
我的目标是拥有它,以便当您点击注释时,将有一张图片,一个名称标签和一个标签,该标签距您的位置有多远(我稍后可以添加计算逻辑)。 I've googled for a long time and all the answers are very confusing.
我已经搜索了很长时间了,所有的答案都很混乱。 Would I need a custom MKAnnotation, a custom MKAnnotationView, or both?
我需要自定义MKAnnotation,自定义MKAnnotationView还是两者都需要? Also, what delegate methods, etc. Thanks!x
另外,还有什么委托方法,等等。谢谢!x
Refer this url link you can add custom annotations on MapView. 引用此URL链接,您可以在MapView上添加自定义注释。
https://bakyelli.wordpress.com/2013/10/13/creating-custom-map-annotations-using-mkannotation-protocol/ https://bakyelli.wordpress.com/2013/10/13/creating-custom-map-annotations-using-mkannotation-protocol/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.